generated-projects icon indicating copy to clipboard operation
generated-projects copied to clipboard

Not validating unique keys properly

Open jmfarina opened this issue 11 years ago • 0 comments

Celerio version: 3.0.108 The Column annotation used to retrieve unique keys is being retrieved from the class, instead of the method:

com.vathys.mcbackend.repository.support.JpaUniqueUtil.validateSimpleUniqueConstraintsDefinedOnMethods(Identifiable<?>entity)

for (Method method : entityClass.getMethods()) {
            Column column = entityClass.getAnnotation(Column.class);
            if (column != null && column.unique()) {

but it should be:

Column column = method.getAnnotation(Column.class);

jmfarina avatar Jul 04 '14 16:07 jmfarina