# Relationships eliminated after updating node properties

**URL:** <https://community.neo4j.com/t/relationships-eliminated-after-updating-node-properties/55117>\
**Category:** Spring Data Neo4j & Neo4j-OGM\
**Tags:** cypher, operations, relationship\
**Created:** [April 21, 2022, 9:24am UTC](https://community.neo4j.com/t/relationships-eliminated-after-updating-node-properties/55117 "2022-04-21T09:24:38Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![gerrit.meier](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/gerrit.meier/32/27374_2.png) [@gerrit.meier](https://community.neo4j.com/u/gerrit.meier)\
**Post date:** [April 22, 2022, 6:16am UTC](https://community.neo4j.com/t/relationships-eliminated-after-updating-node-properties/55117/4 "2022-04-22T06:16:35Z")

</div>

First of all, your observation is right: Loading just the node and persisting it, although it would have relationships, would lead to the removal of relationships on save.  
This is all written in the documentation: [Query creation](https://docs.spring.io/spring-data/neo4j/docs/current/reference/html/#query-creation)  
But there is a solution to this problem called [projections](https://docs.spring.io/spring-data/neo4j/docs/current/reference/html/#projections.sdn.multi-level). This means you create a projection of your entity without any relationships, for example. SDN will then not check those relationships on load or save operations.  
Of course, and this is something for what we initially introduced the projection support, you could also use this to load the data. Given a `ProjectedEntity` as the projection of your entity class.

```auto
List<ProjectedEntity> findByIdentifier(String identifier);

```

Would create and execute the query matching only the properties and relationships defined in the `ProjectedEntity` interface/class.

---

_[View the full topic](https://community.neo4j.com/t/relationships-eliminated-after-updating-node-properties/55117)._
