Uploaded image for project: 'Hibernate OGM'
  1. OGM-1513

Join columns might keep reference to some previously associated, but then deleted, entities

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 5.4.0.Beta2
    • Fix Version/s: 5.4.0.CR1
    • Component/s: infinispan, mongodb
    • Labels:
      None

      Description

      In case of @OneToMany bidirectional associations, without any definitions of cascade. When we delete the entity owner, it might happen that the associates entities would still keep the reference to the, now deleted, entity owner.
      Thus, if we try to create another entity owner, recycling the id owned by the former, we could have associations, between the latter and associated entities, never defined by the user.

      This seems affect only grid and document dialects, such as MongoDB or Infinispan. On the other hand, graph dialects, like Neo4j, have no issue. Probabily because the latters do not need to handle the inverses of bidirectional associations.
      Test case: CleanJoinColumnsAfterDeleteReferencedEntitiesTest.patch

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: