Create a view with the 4 properties and then make a readonly class on that view.
John Davidson On Fri, Sep 9, 2011 at 12:10 PM, raffaeu <[email protected]> wrote: > Good morning everybody. I have a very "particular" request for a > denormalized mapping. > It is a legacy requirement. > I have two entities in two tables *Person *and *Car*. A *Person *has a * > Car*. > > *Person*: > Id > Name > *Car*: > Id > Code > > I have the requirement to expose in the Person table, not only the Car Id > (which can be accomplished using many-to-one) but also the car code > property. > Of course in my Person class, Car is a property of type Car. > I need to keep the FK between Person and Car tables, so I can't use the > component because it doesn't allow me to create a FK. > I can't use the m-t-o otherwise I don't know how to map the Car.Code > property in NHibernate. > > What should I do? I know it is a very particular request. > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/nhusers/-/5a3zzHlZZaAJ. > 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. > -- 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.
