I prepared 2 test cases. In both, there is a PARENT class with collection of CHILDs. The only difference between them is, that one PARENT has @Id annotated on field, in the second case on getter for ID.
The variant with getter fails. Even the mapping table for many-to-many relation is not created in the schema at all!
If you run the test, the test case
testManyToMany_parentIdAsGetter fails, but
testManyToMany_parentIdAsField succeeds.
|