Announcement Announcement Module
Collapse
No announcement yet.
@Reference and spring-data-gemfire 1.2.M1 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • @Reference and spring-data-gemfire 1.2.M1

    hi,

    I am playing around with the repository features 1.2.M1 and I am wondering if the @Reference annotation (defined in spring-data-commons) is supported and seeking clarification about what it does.

    I have found that documentation for the feature is pretty thin but I have assumed that is would perform the same function as @DbRef in the mongo-db project.

    My use case consists of 2 persisted classes:
    @Region(...)
    class EntityA {
    @Id
    String id;
    }

    @Region(...)
    class EntityB {
    @Id
    String id;

    @Reference
    EntityA someRef;
    }
    My assumption is that:

    * that EntityB.someRef is persisted as a reference rather than an embedded value
    * might be lazily dereferenced
    * if an instance of EntityA were retrieved directly via a repository and indirectly via reference field within a single transaction, there would only be a single instance of the object.

    After some basic testing, this doesn't appear to be happening.

    How should I reset my expectations?

    Cheers

  • #2
    Not there yet. I'm working on https://jira.springsource.org/browse/SGF-105 for v 1.2

    Comment

    Working...
    X