Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
08-17-2021 12:28 AM
We started to use SDN 6.1.3 and facing some challenges to understand how we have to adapt our persistence layer to persist our current model without loading the whole graph every time.
(:Partner) -[:HAS_STATE {knowlegeTime: LocalDateTime}]-> (:State) -[:HAS_PARENT {validFrom, validTo: LocalDateTime}]-> (:Partner)
From an external system we receive update messages representing one state of partner:
kin, parentRef, knowledgeTime, validFrom, validTo
Entities
Persistence Logic
Our Aggregate represents a Partner with it's various states and potential parent relationships to other partners. In our persistence layer i would prefer to have an explicit HAS_PARENT relationship instead of using the identifiers in properties of the other aggregates.
Is there any possibility to explicitly model (Rich)Relationships to use Projections as a TargetNode to prevent update / fetching other aggregates when using the Neo4jRepositories and if yes could you provide us an example?
08-19-2021 01:35 PM
It would be great if you could condense your issue into a small reproducible example with a test and share the code. Thank you!
08-27-2021 02:54 AM
An example can be downloaded here. I've tried to explain it within the PartnerPersistenceRepositoryTest class.
All the sessions of the conference are now available online