I've got a lot of answers to my questions here, even if I never asked them. But now I'm fronting a serious problem:
We want to execute DML to the database with stored procedures. Hibernate offers the possibility to define with @SQLInsert, -update, -delete your own prepared statements, which uses hibernate to "generate" the insert, update etc. statements. e.g. I have the following class definition:
The problem is, that the id is generated by the procedure itself and should not be passed or generated by hibernate. But if the id is not used in the prepared statement I get a:
Because Hibernate tries to put the value of the id into the statement and does not find a place holder like ':id'.
does only have impact on non-key-properties, so that they where skipped.
Does anybody know this behavior and can help me out of this mess?