Skip to content

Not validating unique keys properly #3

@jmfarina

Description

@jmfarina

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions