I am looking for Composite Attribute example but can not find it everywhere. I have simple class :
@NodeEntity
public class MyClass{
@GraphId Long id;
Double diameter;
//Property diameter should be from composite attribute (inDiameter and outDiameter)
}
MyClass have property diameter, it should be value from inDiameter or outDiameter (can use both as value with some condition)
And I have the other class like this:
@NodeEntity
public class MyClass2{
@GraphId Long id;
String name;
//Property name should be from composite attribute (firstName and lastName)
}
How I can achieve that?
Do I need to create class for dummy diameter like this?
//without @NodeEntity
Class NominalDiameter{
Double outsideDiameter
Double insideDiameter
}
And I change my property of MyClass :
Double diameter -> NominalDiameter diameter;
I'm using Spring boot parent 1.4.1.RELEASE, neo4j-ogm 2.0.5, Spring Data Neo4j 4