My hibernate versioning is issuing an update statement for no apparent reason.
In my BankAccount mapping file:
<version type="dbtimestamp" name="modified" column="Modified"/>
inthe AvailableBalance mapping file:
<many-to-one name="bankAccount" class="model.businessdomain.orm.BankAccount" fetch="select" >
<column name="BankAccountId" not-null="true" />
</many-to-one>
The resulting sql statements issued, when a select is done from the AvailableBalance table (via a function):
17:12:16,152 DEBUG SQL:401 - select * from dbo.get_availablebalancelist(?) ab where ab.bankAccountId = ?
17:12:31,539 DEBUG SQL:401 - select current_timestamp
17:12:31,625 DEBUG SQL:401 - update dbo.BankAccount set Modified=?, BankAccountTypeId=?, BankID=?, InterestSchemeID=?, BankAccNo=?, SysParamID=?, BankAccName=?, BranchCode=?, UserRef=?, CAMSCode=?, Provision=?, ProvisionPerc=?, OverDraftLimit=?, isIslamic=?, Active=? where BankAccountId=? and Modified=?