Hibernate version: 3
I reuse the code in the tutorial in the
many to one section and I change the insert and update attribute :
Code:
<class name="Person">
<id name="id" column="personId">
<generator class="native"/>
</id>
<many-to-one name="address"
column="addressId"
not-null="true"
insert="false" update="false"/>
</class>
<class name="Address">
<id name="id" column="addressId">
<generator class="native"/>
</id>
</class>
Code:
create table Person ( personId bigint not null primary key, addressId bigint not null )
create table Address ( addressId bigint not null primary key )
When I update the Person table the addressId stay unchanged. It is what I want. Now I want to update the addressId of the Person table and only the addressId without updating the Adress or the others fields of the Person tables.
Is it possible using hibernate ?
Thx.