<img height="1" width="1" src="https://www.facebook.com/tr?id=1076094119157733&amp;ev=PageView &amp;noscript=1">

Cross store experiments

Posted by Jan Machacek on Thu, Apr 5, 2012

Just a quick post about what I'm thinking of hacking together: cross-store persistence between the Spring Data providers. What I would like to have is this:

case class User @PersistenceConstructor() (@GraphId id: java.lang.Long,
                                           @Indexed username: String) {

  var picture: Attachment = _

Notice the @RelatedDocument annotation on a Neo4j @NodeEntity. What I would love to implement is something similar to Spring Data's cross store persistence. You see, at the moment, you can have Neo4j/MongoDB/... instances "attached" to entities in JPA. What I struggled to find is how to have Neo4j @NodeEntity whose portions are stored in, say, MongoDB. Naturally, I would also like to have the inverse: have MongoDB cross-persist Neo4j entities:

case class UserDetails @PersistenceConstructor() (@Id id: String,
                                                  @Field address: String,
                                                  @Field ...) {
  var user: User = _

I am not sure whether the whole thing is a good idea, but I shall report back here once I've done a good day's work!

Recent Posts

Posts by Topic

see all

Subscribe to Email Updates