Hibernate version: 3.1.3
Is it possible to have something like:
Code:
<id name="id" column="id" type="long">
<generator class="assignedOrNative"/>
</id>
With the following behavior:
* Transient (non proxied) object with id!=0, assigned
* Transient (non proxied) object with id=0, native
* Persistant (proxied) object with id!=0, throws exception or updates object.
* Persistant (proxied) object with id=0, illegal ?
This is a bit like the functionality provided by replicate(), but expressed in the mapping file.