springneo4jspring-bootspring-data-neo4jspring-data-neo4j-4

Neo4j/SDN warining: No identity field found for class of type for exception class


In my Neo4j/Spring Data Neo4j project I have a following exception class:

public class CriterionNotFoundException extends NotFoundDomainException {

    private static final long serialVersionUID = -2226285877530156902L;

    public CriterionNotFoundException(String message) {
        super(message);
    }

}

During application startup I see a following WARN:

WARN  o.s.d.n.m.Neo4jPersistentProperty - No identity field found for class of type: com.example.domain.dao.decision.exception.DecisionAlreadyExistsException when creating persistent property for field: null

Why Neo4j/SDN is looking for identity field in this class ? How to correctly configure my application in order to skip this warning ?


Solution

  • You can ignore this warning- this is produced by SDN when building metadata Spring Data REST integration. It should not be doing this for Exceptions of course, and we'll have this fixed.