You usually don't have to bother with this. how does this ` neo4jTemplate.createEntityFromStoredType(node, null)` not work?
M > Am 23.03.2015 um 18:04 schrieb Dr Josef Karthauser > <[email protected]>: > > I’m still struggling with policy mapping with Spring-Neo4j-Data: > > This works: > > neo4jTemplate.createEntityFromStoredType(node, > neo4jTemplate.getMappingPolicy(MyClass)) > > Whereas this doesn’t work: > > neo4jTemplate.createEntityFromStoredType(node, null) > > Why would that be? > > My spring wiring is: > > graphDatabaseFactory(GraphDatabaseFactory) > graphDatabaseService(GraphDatabaseService, “data/graph.db") { bean > -> > bean.factoryBean = "graphDatabaseFactory" > bean.factoryMethod = "newEmbeddedDatabase" > bean.destroyMethod = "shutdown" > } > > bootstrapper(WrappingNeoServerBootstrapper, graphDatabaseService) > { bean -> > bean.initMethod = "start" > bean.destroyMethod = "stop" > } > > xmlns neo4j:"http://www.springframework.org/schema/data/neo4j" > neo4j.'repositories'( 'graphDatabaseService': > "graphDatabaseService", 'base-package': "com.mycompany" ) > neo4j.'config'( 'graphDatabaseService': "graphDatabaseService", > 'base-package': "com.mycompany" ) > ee(ExecutionEngine, graphDatabaseService) > neo4jTemplate(Neo4jTemplate, graphDatabaseService) > > It’s doing my head in! I don’t want to have to read each node label by hand > and then look for the right policy mapper for the associated class. :(. > > I’ll buy a beer for anyone that can help me work this out! > > Many thanks, > Joe > > -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
