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>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---