Uploaded image for project: 'Spring Data Neo4j'
  1. Spring Data Neo4j
  2. DATAGRAPH-267

Collection properties - contains returns true but remove returns false

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.0.1
    • Fix Version/s: 2.1.RC3
    • Component/s: CORE
    • Labels:
      None
    • Environment:
      Using the simple mapping.

      Description

      In some cases a "parent" entity which contains a Set of child entities will not allow you to remove chile entities from the collection, even if it exists in the collection.

      If you call contains on the collection and it returns true, then remove should transitively also return true. If the object is in the collection, then it should be removable.

      In looking at the SDN code, the wrapper collection just passes the remove call to the delegate collection, and it appears that that is returning the false. So in essence, it looks like the JDK collection is the one broken. However, because we have proxies and some other wrappers around our objects, it might be putting in a wrapped object into the collection for the entity.

        Attachments

          Activity

            People

            • Assignee:
              lassewesth Lasse Westh-Nielsen
              Reporter:
              bytor99999 Mark Spritzler
              Last updater:
              Trevor Marshall
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: