Results 1 to 2 of 2

Thread: Questions about Cross-store support

  1. #1
    Join Date
    Feb 2011
    Posts
    19

    Default Questions about Cross-store support

    I'm evaluating a cross-store deign for a current project, where we're considering using both MySQL and MongoDB.

    Having read the [documentation][1], I'm left with a few questions:


    The doucmentation speaks of cross-store support for a JPA Entity which contains a property that is persisted as a `@Document`. Does support exist going the other way? Ie., Can I have a MongoDB document as the parent, which contains a reference to a JPA Entity (or a collection of entities)?

    Eg:

    @Document
    public class Product
    {
    @Entity?
    private Manufacturer manufacturer;

    @CollectionOfEntities?
    private List<Review> reviews
    }


    Similarly, is there support for persisting a JPA Entity which contains a collection of Docuemnts?

    eg:

    @Entity
    public class Shop
    {
    @Id
    private Long id;
    // Product is a MongoDB @Document
    private List<Product> products;
    }

    Is this supported?

    Given that cross-store persistence is so new, are there any resources for design best practices, or pitfalls to avoid?

    [1]: http://static.springsource.org/sprin...go.cross.store

  2. #2
    Join Date
    Feb 2011
    Posts
    19

    Default

    Just bumping this.

    Also, this question is cross-posted to Stack Overflow, which now has a bounty running.

    http://stackoverflow.com/questions/9...or-collections

Tags for this Thread

Posting Permissions

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