We have a BaseEntity hbm and an Address hbm that inherits from the
BaseEntity using the joined-subclass strategy. (Using Oracle)
The Address HBM is defined as follows:
<joined-subclass entity-name="Address" extends="BaseEntity">
<property name="AddressF1" type="string"/>
<property name="AddressF2" type="string"/>
When executing the following query:
"Update Address add set add.AddressF1 = 'foo', add.AddressF2='bar' where add.ID=1"
The generated sql is:
insert into HT_Address SELECT address0_.ID2 as ID2
FROM Address address0_
inner join tbl_base address0_1_
on address0_.ID2=address0_1_.ID WHERE ID2=0;0 = 512
UPDATE Address SET AddressF1='foo' WHERE (ID2) IN (select ID2 from HT_Address)
The problem is that the sql only updates the first field and not the second field.
Note that when not using an inheritance strategy, the hql update works properly.