Hi,
I just want to insert in one of my tables a record with some optional values. Here a little snippet:
Code:
...
@ManyToOne(fetch = FetchType.EAGER, optional = true)
@JoinColumn(name = "value", nullable = true, )
public Table2 getValue() {
return this.value;
}
...
Exactly this is my problem. If I set value = null Hibernate creates an insert statement like "Insert Into Table1(...., value) Values(....,'')
Why the hell does hibernate creates an empty string instead of just passing NULL to the statement?
Jonny