Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:3.2.6.ga
I'm using Spring & Hibernate, using standard Dao Pattern.
Mapping files:
@Entity
class Parent {
@ManyToOne(cascade={CascadeType.PERSIST, CascadeType.MERGE})
@JoinColumn(name="child_id", nullable=false)
private Child child;
}
@Entity
class Child {
... some fields...
}
When I try to make Parent persistent (property child is set correctly), hibernate engine replies, that property child cannot be null (however it is not).
Everything works correctly, if cascade is set to CascadeType.ALL.
I guess this is hibernate issue. Should I put it into JIRA? Any other details needed?