Hello.
A have a problem or rather misunderstanding :(
There is relation one-to-many
Code:
<class name="Workstation" table="SP_WORKSTATIONS" dynamic-update="true" dynamic-insert="true" lazy="true">
<meta attribute="scope-set">private</meta>
<id name="id" type="long" column="WORKSTATIONID" >
<generator class="sequence">
<param name="sequence">GEN_SP_WORKSTATIONS_ID</param>
</generator>
</id>
...
<set name="logs"
lazy="true"
inverse="true"
cascade="save-update">
<key column="WORKSTATIONID"/>
<one-to-many class="WorkstationLog" />
</set>
and
Code:
<class name="WorkstationLog" table="SP_WORKSTATIONLOGS" dynamic-update="true" dynamic-insert="true" lazy="true">
<composite-id >
<key-many-to-one name="workstation" class="Workstation" column="WORKSTATIONID" />
<key-property name="startdatetime" type="timestamp" column="STARTDATETIME" />
</composite-id>
...
I fetch the object Workstation from DB and collection logs isn't filling with WorkstationLog objects, lazy="true" works.
Then add new object WorkstationLog in Workstation's ogs-collection . And see that hibernate starts fetching all WorkstationLog objects which already exist in DB. I woukd like to just add new WorkstationLog object without fetching already existing objects.
Is this possible?[/code]