Closed nmervaillie closed 6 years ago
This improvement allows to have persistence constructors in Spring Data Neo4j.
Notes about having the same thing with a pure OGM : A pain point is to get parameter names. There is some infrastructure in SDC to get parameter names from class debug information (-parameters compilation args), of if not found by parsing the bytecode and looking at java's LocalVariableTable.
This may not be so easy to do it from scratch and/or probably require adding a dependency. An option could be to enhance FastClasspathScanner to handle it. Maybe we could also use java.beans.ConstructorProperties to handle it. Another thing is kotlin support that require special handling.
Expected Behavior
OGM should allow to customize entity instantiation to make it possible to use persistence constructors.