I have the following mapping:
Code:
<class name="Run">
<id name="id" column="run_id">
<generator class="seqhilo">
<param name="sequence">run_id_seq</param>
<param name="max_lo">10</param>
</generator>
</id>
<version name="version" />
<property name="runTypeId" column="run_type_id" />
</class>
<class name="MsRun" table="ms_run">
<id name="id" column="run_id">
<generator class="assigned">
</generator>
</id>
<version name="version" />
<one-to-one name="requestedRun" class="Run" constrained="true" />
</class>
The run table above is polymorphically associated to a few tables and ms_run is one of them. But I only need an association property in MsRun and hence I used the one-to-one. I tried the foreign generator but got an error and so I switch to assigned.
Anyway, this mapping works fine a few times and then it hangs on an update (probably from an internal flush 'cause I am not updating / flushing / commiting) to the run table. Its strange that its doing an update 'cause I don't have any transient/dirty objects referenced from the persistent objects. This is a query-only session, so I have not started a transaction.
My instincts point to the mapping, but I have no clue how to fix it. My last option is to run it through the debugger but am concerned about all the code generation that may prevent/hinder it.
I am pretty much stuck, so any help would be greatly appreciated.