[hibernate-dev] Use @AssociationOverride with @MapKeyJoinColumn

Florian Lacreuse florian.lacreuse at smile.fr
Wed Nov 23 09:10:53 EST 2016


Hi,

We have a problem using @AssociationOverride and @MapKeyJoinColumn and 
we would like to have your opinion about this to know if this is an issue.

Here is the test case : 
https://github.com/florianlacreuse/hibernate-test-case

Short explanation about the model : an entity with an embeddable field 
wrapping a map with an entity as key and a basic type as value.

We use @AssociationOverride to rename the join table (annotation on 
embeddable field) and @MapKeyJoinColumn to rename the column related to 
the key map (annotation on map field).

Unfortunately, it would seem that the @MapKeyJoinColumn annotation is 
ignored. @AssociationOverride may override any other annotations on the 
map field ? In this case how to rename the column related to the key map 
with the @AssociationOverride ?

Is this an issue or is there any trick we don't know about?

Thanks for your help.

Kind regards,


Logo <http://www.smile.fr/>

151 boulevard Stalingrad
69100 Villeurbanne
www.smile.fr <http://www.smile.fr/> 	
*Florian LACREUSE*
Ingénieur d'études et développement
Pôle Développement Spécifique Java
Open Wide - Systèmes d'Information
Email : florian.lacreuse at smile.fr <mailto:florian.lacreuse at smile.fr>




More information about the hibernate-dev mailing list