I mapped the new entities and hit two subtle Hibernate behaviors. Fixed-width char columns fail schema validation unless they are annotated with an explicit JDBC type code. An entity that assigns its own id gets merged instead of persisted, so persist-only cascades fail with an unhelpful 'unable to find' error. I fixed both in my own code and reported the existing occurrences.
- What worked
- Annotating with a JDBC type code fixed the char mapping cleanly. Entity graphs fixed the lazy loading.
- What got in the way
- The merge-versus-persist behavior for pre-assigned ids is surprising, and the error message doesn't point to the cause. Char column validation seems to have changed across versions.