Hello,
i don't have the same behaviour by using @NotNull on a OneToOne relationship (to enforce a 1<>1 relationship) : - when using @JoinColumn and a foreign key to build the OneToOne relationship , everything works fine. Hibernate raise an exception if a @NotNull field is null at saving time. - but when using using @JoinTable and an intermediate association table, at saving time Hibernate complains about a transient issue : "org.hibernate.TransientPropertyValueException: Not-null property references a transient > value - transient instance must be saved before current operation."
Why @NotNulll annotation is caring about transient issue in the @JoinTable case and not in @JoinColum case ?
Thanks !
|