code-small.jpg

 

Cake Team Blogs

Cake Solutions architects, implements and maintains modern and scalable software, which includes server-side, rich browser applications and mobile development. Alongside the software engineering and delivery, Cake Solutions provides mentoring and training services. Whatever scale of system you ask us to develop, we will deliver the entire solution, not just lines of code. We appreciate the importance of good testing, Continuous Integration and delivery, and DevOps. We motivate, mentor and guide entire teams through modern software engineering. This enables us 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




Videos

                                

Blog

                                

Case Studies


img24

Cake
Software

Find out more

img23

DevOps

Find out more

img24

Cake
Invest®

Find out more