Hi Dana, I have posted exactly the same problem to this group just recently, but coming from a legacy DB schema point of view that can't be changed: http://groups.google.com/group/fluent-nhibernate/browse_thread/thread/e20ec7668ce6fe03
I'm close to a solution, having been persuaded not to map to 3 entities. Will update that thread when I'm done. Boz On Jan 22, 10:51 am, Dana Efros <[email protected]> wrote: > Hi. I have to 2 entities: > > class A{ > int id; > string name;} > > class B{ > int id; > A refObj; > string name;} > > How can I map this 2 classes so I will have 3 tables: > table A with 2 columns: id and name > table B with 2 columns: id and name > table AB with 2 columns: idA and idB > > In the AB table I need to have a row only when refObj will not be > null.The field refObj from the B entity will have values only > occasionally and I don't want to have a column in the B table with > null value for almost all the rows > > With a many to many relations I know how, but with a reference ... > Thanks -- You received this message because you are subscribed to the Google Groups "Fluent NHibernate" 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/fluent-nhibernate?hl=en.
