code-small.jpg

 

Cake Team Blogs

Using the very latest technologies, Cake Solutions helps organisations take innovative and disruptive ideas and develop them into reactive software solutions. Cake’s success is underpinned by our unique One Team® approach that allows for standalone projects or close collaboration with the clients’ technology teams. Cake provides mentors to guide the entire organisation through modern software engineering, continually transferring skills and knowledge to client teams in the process. This enables Cake to deliver not just software but to transform the way organisations think about and execute software delivery.

 

 

Cross store experiments

Posted by Jan Machacek

Find me on:

05/04/12 09:38

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:

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

  @RelatedDocument
  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:

@Document
case class UserDetails @PersistenceConstructor() (@Id id: String,
                                                  @Field address: String,
                                                  @Field ...) {
  @RelatedNode
  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!

Posts by Topic

see all

Subscribe to Email Updates