Thank you! but what do you mean when you say "fully mapped"? Could you post a sample xml?
Thank you a lot again!!! Il giorno lunedì 8 ottobre 2012 04:30:10 UTC+2, TheCPUWizard ha scritto: > > If I understand correctly then “Home” and “Business” will always map to an > entry in “Addresses” (possibly the same one, or maybe different ones). > > > > If this is the case, I would have the List<Address> be fully mapped, and > implement the Home and Business on lazy getters (no backing field, look it > up from the short list) based on the ID. > > > > *From:* [email protected] <javascript:> [mailto: > [email protected] <javascript:>] *On Behalf Of *barbara > *Sent:* Sunday, October 07, 2012 4:37 PM > *To:* [email protected] <javascript:> > *Subject:* [nhusers] multiple reference to the same table from a single > class > > > > I have a class "person" with (amongst the others) these properties: > > - home address (of type address) > > - billing address (of type address) > > - addresses (of type List<address>, it contains all the known addresses of > the person) > > > > the collection "addresses" holds reference to all the known addresses of > the person, including the two explicitly referenced by the two other > properties. Or maybe the person has just one address that is referenced by > "home address", "billing address" and "addresses". > > How should I map this class? And also, how can I be shure that in the last > case the "three instances" point to the only row in the "addresses" table? > > > > Thanks in advance! > > -- > 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/-/NjrtRmmxknIJ. > To post to this group, send email to [email protected] <javascript:> > . > To unsubscribe from this group, send email to > [email protected] <javascript:>. > 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 view this discussion on the web visit https://groups.google.com/d/msg/nhusers/-/1gq9VoHpruAJ. 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.
