-
Mar 22nd, 2012, 09:13 PM
#1
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
-
Mar 26th, 2012, 01:23 AM
#2
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
-
Forum Rules