Hello.
In my persistent class i have @EmbeddedId :
@Override
@EmbeddedId
@AttributeOverrides(
{
@AttributeOverride(name = "xNumber", column = @Column(name = "x_number")),
@AttributeOverride(name = "idUser", column = @Column(name = "id_user"))
})
public TradeId getId() {
return this.id;
}
I have to get map DB columns and property name from annotations @AttributeOverride.
For DB columns I use metadata:
....
getAnnotationConfiguration().getClassMapping(pmClass.getName()).getProperty(lvProperty).getColumnIterator();
...
this give me column:"x_number" and "id_user".
Is possible get name ("xNumber", "idUser") from @AttributeOverride annotations.
Please give me advice what can I do this.
Thanks in advance
GG
|