Results 1 to 2 of 2

Thread: @Reference and spring-data-gemfire 1.2.M1

  1. #1
    Join Date
    Jan 2012
    Posts
    5

    Default @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. #2
    Join Date
    Oct 2004
    Location
    Berwyn, PA
    Posts
    56

    Default

    Not there yet. I'm working on https://jira.springsource.org/browse/SGF-105 for v 1.2
    David Turanski
    SpringSource Senior Software Engineer

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •