You may want a <HasMany()> on the other ends of the <Any()> relationships. You need to specify the foreign key column, AR/NH will infer the rest from the list type.
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of paulddw Sent: 09 April 2011 03:26 PM To: Castle Project Users Subject: Opposite side of an "Any" I have a class that looks like this public class Comment { [Any(typeof(int), MetaType=typeof(int), TypeColumn="RecordTypeID", IdColumn="RecordID", Cascade=CascadeEnum.SaveUpdate)] [Any.MetaValue(1, typeof(News))] [Any.MetaValue(2, typeof(Feature))] public IContentItem Item {get;set;} } How do I Create the Many on the News/Feature side?? public class News : IContentItem { [ManyRelationship] public IList<Comment> Comments {get;set;} } public class Feature : IContentItem { [ManyRelationship] public IList<Comment> Comments {get;set;} } Anyone got any ideas on this please I have been mucking around with this for a few days. By the way the answer is not HasManyToAny -- You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en.
