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.

Using merge in SDN with neo4j 4.3

How to use the merge option in spring data neo4j entity objects rather than using CQL @Query .

3 REPLIES 3

I think SDN repositories use MERGE by default for save operations.

Yes its by default. By using SDN we might have to fetch the required entity or node from neo4j db and
then update as required and save the entire entity, but the fetching part from neo4j db might be a costly call when the number of requests increases. So is there any way to avoid this fetch and allow SDN to handle merge if present and create a new node if not present ?

At the repository abstraction level, you already have a few options:

Whether you're using fragments or not, you are free to rely on the lower-level abstractions provided by Neo4jTemplate and Neo4jClient.

I believe you can achieve what you want with either of these options.