Hello together,
I have a problem with the @ManyToOne mapping. I get this exception: No row with the given identifier exists: [hibernate.data.OperatorDB#0]
I have to say that bevor of using Java and Hibernate there was a C-ODBC solution, that could not handle null fields in the DB, so they decided to make all Fields 'not null' and wrote a 0 instead in to the DB.
Now Hibernate tries to solve a connection where there is no connection. Is there any posibility to tell Hibernate, if it's solving the @ManyToOne connection, it should replace or ignore connections with 0's in it?
Same problem if i'd like to add a new row with no connection. Because Hibernate tries to insert null, where the DB want's to have a not null field. (This Problem i could solve with a Reference-Object with the ID=0 so it wouldn't be a real problem, it's only a bit ugly)
At the moment we can't change the DB-Schema.
Hopefully there is an easy solution
Sorry for my bad english
|