I have a problem with my code (obviously) and after many searches on Internet, I don\'t find an answer to my problem, so I ask my question here. I have this :
Error message you get explains it quite well, Embeddable that is used as an embedded id can contain only basic mappings, not relationships. In JPA 2.0 specification this is told with following words:
Relationship mappings defined within an embedded id class are not supported.
Just define attributes that are part of composite id in embeddable that is used as embedded id, and map relationships in entity itself (or in another embeddable and include mappings with @Embedded).
In my opinion this is based on the ManyToOne mapping in the IdResident class cause the error message pushs me into this direction.