Neo4j: Node as RelationshipEntity-Property
Hi,
i am trying to create a relationship between two entities "guest" and "product" with the additional information of an "orderPoint", which is itself an entity.
Code:
@NodeEntity
public class OrderPoint extends DescribedEntity {
...
}
@RelationshipEntity(type = "orders")
public class Order implements Serializable {
...
protected Date createdAt;
@Fetch
@RelatedTo(type = "ordersAt")
@NotNull
protected OrderPoint orderPoint;
...
}
Order.createdAt works fine, Order.orderPoint does not. I am able to set the orderPoint and to save the relationship without an error, but i cannot fetch the orderPoint afterwards. Well, saving the relationship without an error doesn't mean it has to work.. is Spring Data Neo4j able to work this way?
I am using Spring Data Neo4j 2.1. Snapshot.
Greetz,
Markus Schulte