3

I understand there are many advantages in using Spring data neo4j's advanced mapping rather than the simple mapping.

My question is what are the cons of using advanced mapping over the simple mapping?

balteo
  • 23,602
  • 63
  • 219
  • 412

2 Answers2

6

I feel that there are almost no drawbacks of using the advanced mode. The only thing that's been bugging me, is the relatively poor IDE support of AspectJ. This was initially a hell to configure and get it right. Apart from that, our application is a lot faster with the advanced mapping mode so we never looked back.

tstorms
  • 4,941
  • 1
  • 25
  • 47
  • 3
    Correct, In general SDN should be used against an embedded DB, and then advanced mapping is much faster as it does read-through and write-through (in transactions). So the IDE issue is the only caveat but if you abstain from using the methods like `persist` on the object they shouldn't affect you. And if you move your database interaction code all in transactional methods it gets even faster and more convenient (no dirty-management). – Michael Hunger Mar 25 '13 at 11:29
  • @MichaelHunger If we have multiple machines running the code which accesses the neo4j db, then how can we have neo4j in embedded mode? – Amit Aug 01 '14 at 13:38
  • @MichaelHunger Also, would you prefer advance mapping over simple mapping even if we have neo4j running in standalone mode? – Amit Aug 01 '14 at 13:40
1

According to Q5 in this post, simple mapping is favoured if you are talking to Neo4J via REST style while advanced mapping if you are using Neo4J embedded

Community
  • 1
  • 1
Mike Holdsworth
  • 1,088
  • 11
  • 12