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

NodeEntity attributes are NULL after transaction closed when using AspectJ

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 3.3 GA (Fowler)
    • Fix Version/s: None
    • Component/s: CORE

      Description

      I've got a strange problem when using AspectJ, Neo4j NodeEntities and transactions.

      I'm using spring-data-neo4j with aspectj weaving. The problem is, that my fetched entities are empty outside of the transaction. Without AspectJ everything works as expected.

      As Michael said on Stackoverflow when usign AspectJ every get should be in a transaction, if there isn't an active transaction there should be opened a new. I think this behaviour is missing.
      Nevertheless I think this behaviour is a bit curious. If my entity is used outside of a transaction I would guess that it's then detached and changes will not be tracked automatically. Like it's without AspectJ.

      I added a demo-project here as an attachment. Use `mvn test` and everything is fine, with `mvn test -Paspects` (which activates AspectJ) the test fails.

        Attachments

          Activity

            People

            • Assignee:
              mhunger Michael Hunger
              Reporter:
              chris922 Christian Bandowski
              Last updater:
              Nicolas Mervaillie
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: