This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Me agian! ;-) Just wondering if I can have a Many to Many relationship, hopefully with a through relationship, that starts and ends on the same model/table. This is a snippit of my intermediate class which should give you an idea of what I'm trying to accomplish: public partial class WebUserFriend : Entity<int> I've been trying with all sorts of different ways but can't seem to get it working. At one stage I was trying to use the Column attribute to map the relationship... was I on the right track there? Thanks again guys. |
|
|
Hi Charles, If you attach a more complete sample we can take a look and get back to you. Cheers, Andrew. |
|
|
Hi Andrew, I've attached a db diagram and my two model files (cut down) to try demostrate what I want to do. I've also put a couple of questions in the comments. Let me know if you need anymore info. Thanks again, Charles.
|
|
|
Hi Charles, Sorry for the delay. When there is more than one association between two entity types you need to use the ReverseAssociationAttribute like so:
[ReverseAssociation("WebUserFriends")]
[ReverseAssociation("WebUserFriendsReverse")]
You apply this attribute at one end of an association (either one) so LightSpeed knows which is which. Cheers, Andrew. |
|