Hi! Your Employee-property in the Address object was probably null when you tried to save the address.
Tapio On Sat, May 23, 2009 at 2:48 PM, Ahmed Emad <[email protected]> wrote: > > i get this message when i tray to save object with one-to-one > association > the error : > attempted to assign id from null one-to-one property > the mappings: > > <class name="Address" table="Address" lazy="false" > > <id name="Id" column="Id" type="Int32"> > <generator class="foreign"> > <param > name="property">Employee</param> > </generator> > </id> > <property name="SNN" column="SNN" type="String" > not-null="true" /> > <one-to-one name="Employee" class="Employee" > constrained="true" /> > </class> > </hibernate-mapping> > > <class name="Employee" table="Employee" lazy="false" > > <id name="id" column="id" type="Int32"> > <generator class="native"/> > </id> > <property name="name" column="name" type="String" /> > <property name="manager" column="manager" type="Int32" /> > <one-to-one name="Address" class="Address" /> > </class> > </hibernate-mapping> > > > > -- Tapio Kulmala "Those are my principles, and if you don't like them... well, I have others" - Groucho Marx http://friendfeed.com/tapsakoo http://twitter.com/tapiokulmala http://www.linkedin.com/in/tapiokulmala --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
