I want to represent this type of modeling with Spring Data Neo4j:
Object ------Value------> Property
...where Object
and Property
are NodeEntity
, and where Value
is a RelationshipEntity
.
For instance:
Car1 ------String value="Ford"------> Brand
Car1 ------int value=20000------> Cost
Car2 ------int value=30000------> Cost
Car2 ------boolean value=true------> HasWheels
I know that I have the possibility to put all these properties directly in the car nodes. But I'd like to use this modeling instead for graph traversal optimization in the future. It would look like this:
@RelationshipEntity(type="PROPERTY_VALUE")
public class PropertyValue {
@GraphId Long id;
@StartNode Car car;
@EndNode Property property;
<???value_type???> value;
public PropertyValue() {
}
}
The problem is that I don't know which type I have to use for the value
property. Is there any possibility to do that with Spring Data Neo4j?
Thank you.