Hi,
is there a away to determine the property of an entity class, that represents a given column in a table?
I found the metadata package, but Couldn't find a method to that effect and also the reference documentation doesn't help, neither does Google.
What I actually try to accomplish:
We have entities with multiy Column Unique keys defined via.
Code:
@UniqueConstraint(columnNames ...
Before saveOrUpdate I'd like to check if the unique key would be violated. (I am aware that I still might get UK violations due to race conditions).
Therefore I create Criterions to find matching recordsets in the database.
I now have the potential values, the properties they belong to and the columns that are constraint. But I am missing the relation between property names and columns.
Anybody an idea how to solve this problem?