SDN4 - Display MappingException when using an interface as the end of an Entity relationship

This functionality worked at some point, but seems to have broken in the last SDN4 snapshot (7-16-15)

I have two node classes, one representing intermediate, non-leaf nodes and one representing the vertices of the first degree leaf vertices. The two classes implement a common interface.

public interface Node {
    ...
}

@NodeEntity
public class SimpleNode implements Node {
    ...
}

@NodeEntity
public class SimpleLeafNode implements Node {
    ...
}

      

The first one can be related to other intermediate nodes OR leaf nodes, and I modeled this relationship by mapping the class SimpleNode

to Node

INTERFACE:

@RelationshipEntity
public class SimpleRelationship {

    @StartNode
    private SimpleNode parent;

    @EndNode
    private Node child;
}

      

When I try to start my Spring Boot application, I get an SDN mapping exception:

Caused by:
    10:51:04.173 [DEBUG] org.neo4j.ogm.metadata.MappingException: No identity field found for class: com.sdn4demo.entity.Node
    10:51:04.174 [DEBUG]    at org.neo4j.ogm.metadata.info.ClassInfo.identityField(ClassInfo.java:291)
    10:51:04.174 [DEBUG]    at org.springframework.data.neo4j.mapping.Neo4jPersistentProperty.<init>(Neo4jPersistentProperty.java:76)
    10:51:04.174 [DEBUG]    at org.springframework.data.neo4j.mapping.Neo4jMappingContext.createPersistentProperty(Neo4jMappingContext.java:100)

      

Again, this worked until snapshot 7-16-15, so my questions are not supported features? This is mistake?

A contrived example exists: https://github.com/simon-lam/sdn-4-demo

Play by performing ./gradlew clean test --debug

+3


source to share


1 answer


This is mistake. We are currently working on sorting information by SD commons and integrating Spring DATA REST, and this is one of the consequences of using the material to eliminate bleeding.



Using RC1 is probably the best choice at the moment. Follow this JIRA issue to see when it completes: https://jira.spring.io/browse/DATAGRAPH-564

+3


source







All Articles