Code Monkey home page Code Monkey logo

Comments (4)

michael-simons avatar michael-simons commented on June 19, 2024

Hi @ma-ku thanks for your report.

I have to say, "sorry, you're holding it wrong".

A couple of things:

  • On the entity storing the relationship properties (in your sample, BugRelationship) you forgot to annotated it with @RelationshipProperties. Without that, it won't be recognised as a "entity" (in tick marks, because SDN does not consider those as root entities) holding relationship properties, but only as a normal entity being stored, graph would than look as shown in the picture below
  • If you add the annotation and actually maintain the bidirectional relationships you defined, things do work as expected.

I will push a commit shortly demonstrating that and closing the issue.

The commit will contain two solutions: First, you're fixed solution, storing the related entities separately. I would however recommend you to follow a solution in which you just persist your root aggregate.

image

from spring-data-neo4j.

ma-ku avatar ma-ku commented on June 19, 2024

OK, you are right if the annotation is missing but I unfortunately stripped this when I removed all the additional annotations such as Lombok and such. The classes are annotated with @Node and @RelationshipProperties as expected. So at least on our side it still is not working. Not sure what you are going to commit but I would like to see such an example somewhere working. Actually I believe that this is either a nasty edge case or that we have forgotten something in the config of the classes that makes this fail.

This error occurred after we had introduced the abstract base class for the target nodes as we now wanted to model them as nested containers of items. Before that, we only had one concrete target entity and everything was fine. So I would ask you to double check this particular scenario.

from spring-data-neo4j.

michael-simons avatar michael-simons commented on June 19, 2024

See 7d38286

I will be traveling the next 2 weeks, I would defer this than to @meistermeier next week.

from spring-data-neo4j.

michael-simons avatar michael-simons commented on June 19, 2024

Your test cases did not cover one important aspect; the relationships are still there in the sense that the total number is correct, but the properties stored with the relation get dropped. So we experience a loss of information on entities we do not touch and that is what this ticket was about. So maybe holding it wrong is not entirely correct here but I liked the approach how that was handled as a test case and provided more insight with this ticket. I would have appreciated a bit more communication so I could have clarified this instead of just rejecting it.

from spring-data-neo4j.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.