I have two maven projects;
a) A REST Server project
b) A Rest consuming client project
I would like to make a 3rd project containing domain POJO classes - and add it as a dependency in the two other projects so I only have one project with the domain classes. However, the REST Server project is depended on org.neo4j.ogm which uses annotations to achieve graph persistence (@NodeEntity, @Id, @GeneratedValue, @RelationshipEntity etc.).
Clearly, I don't want the POJO project depended on anything, since it's going to be used by the client also. So my question is; can I add these settings manually somehow, not using the annotations?
Neo4j-OGM only works with annotations and does not have for example XML-based declaration support.
It would be a little bit hacky and limited but there is one scenario this could work:
@NodeEntity
annotation will get recognized as such if you use an auto-generated id as Long id
(without @Id
and @GeneratedValue
annotation).@RelationshipEntity
definitions.List<User> friends
would become something like (...)-[:FRIENDS]->(:User)
)@Property
, @Convert
, etc.