One other thing actually. Is there any way of telling hibernate to lazy-load a component ? Say in the example above, I don't need the Address to be loaded until I do myEntity.theAddress() .... is that possible ?
On 23 Apr, 15:11, graphicsxp <[email protected]> wrote: > Thanks. It makes sense now :) > > On 23 Apr, 14:46, Germán Schuager <[email protected]> wrote: > > > * would I need to create a 'Address' .Net class ? > > yes > > > * If so how come we don't need to use the attribute 'class' ? > > the address doesn't have a life of its own (nor identity), it always > > correspond to a given person... it is a value object. > > > * Does <component> replaces this ? > > yes > > > On Thu, Apr 23, 2009 at 10:33 AM, graphicsxp > > <[email protected]>wrote: > > > > Hi, > > > > I was looking at the tutorial about components on the blog... In the > > > following example : > > > > <class name="Person" > > > table="People"> > > > > <id name="Id"> > > > <generator class="identity"/> > > > </id> > > > <property name="Name" /> > > > <component name="Address"> > > > <property name="Line1"/> > > > <property name="Line2"/> > > > <property name="City"/> > > > <property name="Country"/> > > > <property name="ZipCode"/> > > > </component> > > > </class> > > > > I'm a bit confused , would I need to create a 'Address' .Net class ? > > > If so how come we don't need to use the attribute 'class' ? Does > > > <component> replaces this ? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
