Hi!
I use Spring 3 and Hibernate 3. and have the following problem:
This is a piece of my class I want to persist
Code:
@Id
private String id;
public String getId() {
return this.id;
}
public void setId(String id) {
this.id = id;
}
In my test method I set the id and persist my object via
Code:
hibernateTemplate.save(object)
When I start this test I get
Code:
ORA-01400: Cannot insert null [...]
It's strange, because, when I remove the @Id annotation and define another property as identifier, which is generated by Hibernate, everything works fine.
Does anybody know what's going on?
Any help is appreciated :)