Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
3.2.2
Mapping documents:
<hibernate-mapping package="myproject.test">
<class name="Posting" table="POSTING">
<many-to-one name="jobOpening" column="JOBOPENING_ID" insert="true" update="true" class="myproject.test.JobOpening" not-null="false">
</many-to-one>
<many-to-one name="requisition" class="myproject.test.Requisition" insert="false" update="false" formula="jobOpening_id" not-found="ignore">
</many-to-one>
<many-to-one name="position" class="myproject.test.Position" insert="false" update="false" formula="jobOpening_id" not-found="ignore">
</many-to-one>
</class>
</hibernate-mapping>
Requisition and Position are joined subclasses of JobOpening. My expectation with this mapping is that depending on the value of jobopening_id column posting table either requisition or position property will get populated in posting object and other one will be null.
But thats not the case, I am getting this exception
org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [myproject.text.Position#160673]
while trying to load an posting object in which jobOpening refers to a requisition.
thanks