Ah, I see. That way, if I have an entity to hold the IList<OtherEntity>, then the collection can be lazy loaded. Thanks!
> On Feb 8, 3:19 am, Ayende Rahien <[email protected]> wrote: > You have to create an intemediatry entity in the middle > > On Sun, Feb 8, 2009 at 4:42 AM, Duarte Nunes <[email protected]> wrote: > > > Hi, > > > I'm dealing with an exotic mapping I can't get straight, and would > > appreciate any help! > > > Consider the types Entity, Key, OtherEntity. I'm trying to map the > > following scenario: > > > class Entity { > > public IDictionary<Key, IList<OtherEntity>> Property { get; set; } > > } > > > On the database, Entity, Key and OtherEntity each have a table, and a > > fourth one does the ternary association. I've been using the following > > mapping, but to no avail: > > > <map name="Property" cascade="all" lazy="true" > > table="Entity_Key_OtherEntity"> > > <key column="[Entity]" /> > > <index-many-to-many column="[Key]" class=" Key" /> > > <many-to-many column="[OtherEntity]" class=""OtherEntity"/> > > </map> > > > When I try to update an instance of Entity, for some reason I get a > > System.Reflection.TargetException. Do you have any idea about what I'm > > missing? > > > Thanks! > > -Duarte --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" 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/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
