Dear all,
I don't understand how to manage save and update.
Actually i would like to save value when there is no data for the key and update when any.
I use saveOrUpdate function but when there is not data, it crashes and if I use save function it crashes when there is data !
Moreover I use a string key and unsaved-value="null" for this key so it is strange ....
My mapping is as follows :
Code:
<hibernate-mapping>
<class name="fr.gouv.finances.dgi.opale.commun.transverse.persistent.SirenPersistent" table="SIREN">
<id name="numSiren" column="PK_NUM_SIREN" unsaved-value="null">
<generator class="assigned"/>
</id>
<property name="entrepriseDge" column="APPARTENANCE_DGE" not-null="true"/>
</class>
</hibernate-mapping>