May 2, 2012

Java: org.hibernate.ObjectNotFoundException: No row with the given identifier exists:

None-annotated

<many-to-one name="employee" class="Employee"
column="CITY_ID" not-null="false" lazy="false" not-found="ignore">
</many-to-one>

Annotated

@NotFound(action=NotFoundAction.IGNORE)
@OneToOne
@JoinColumn(name="CITY_ID")
private City city;
// your getter and setter here

No comments: