cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Can I use dynamic properties mapping in SDN?

I'm wondering if it is possible to use dynamic mapping of node properties in current version of Spring Data Neo4j? I've seen some posts from 2018-19 that used that feature, but It seems like there have been some changes that removed it from current release.

4 REPLIES 4

What do you mean with "dynamic node properties"?

Hi @gerrit.meier , I thought that just as you can have field Map<String, Node> that is populated with nodes related to current node (in spring boot docs it's called dynamic relationships), I hoped that it's possible to do something similar, but with node attributes (primitive datatypes). I'm modeling RDFS / OWL ontology.

I have seen similar behaviour in OGM, but I can't find it in SDN.

@gerrit.meier

I meant @Properties annotation from OGM.
OGM - Annotating Entities

The @Properties annotation still exists and works as in Neo4j-OGM. It can redirect property names from the Java to the graph world.
What you are referring in you first answer to is something different than dynamic relationships. Dynamic relationships exist in SDN, but you cannot use Java driver's primitive Node type here. It has to be a @Node or @RelationshipProperties annotated type.
To mimic the behaviour you are currently seeing in Neo4j-OGM, I would advice to use the Neo4jClient only and use the mapping feature of SDN when needed.
We have a section in the documentation describing it with an example: Spring Data Neo4j