Paul, that GDB instance you get is NOT supporting deletions or transactions (it does just ignore them) it's more for reading stuff. See the JavaDoc for the method:
/** * * @return a GraphDatabaseService that does not support deletion and transactions */ public GraphDatabaseService getGraphDbService(); When having a Batchinserter open, please do all modifications via it ... Cheers, /peter neubauer G: neubauer.peter S: peter.neubauer P: +46 704 106975 L: http://www.linkedin.com/in/neubauer T: @peterneubauer Neo4j 1.6 released - dzone.com/6S4K The Neo4j Heroku Challenge - http://neo4j-challenge.herokuapp.com/ On Tue, Feb 14, 2012 at 10:33 PM, Paul A. Jackson <paul.jack...@pb.com> wrote: > Just started using the batch inserter and I think I am missing a basic > concept. > > This code snippet using Neo 1.5 returns a zero-length map. I would expect it > to have a single property (MyKey). > > String storeDir = "./neodb"; > deleteDirectory(new File(storeDir)); > BatchInserter batchInserter = new BatchInserterImpl(storeDir); > GraphDatabaseService graph = batchInserter.getGraphDbService(); > Transaction transaction = graph.beginTx(); > Node node = graph.createNode(); > long id = node.getId(); > node.setProperty("MyKey", "MyValue"); > transaction.success(); > transaction.finish(); > Map<String,Object> properties = batchInserter.getNodeProperties(id); // > properties is empty > > I added the Transaction stuff for testing, but was expecting that to not be > necessary as well. > > Thanks, > > Paul Jackson, Principal Software Engineer > Pitney Bowes Software > 4200 Parliament Place | Suite 600 | Lanham, MD 20706-1844 USA > O: 301.918.0850 | M: 703.862.0120 | www.pb.com > paul.jack...@pb.com > > Every connection is a new opportunityT > > > > Please consider the environment before printing or forwarding this email. If > you do print this email, please recycle the paper. > > This email message may contain confidential, proprietary and/or privileged > information. It is intended only for the use of the intended recipient(s). If > you have received it in error, please immediately advise the sender by reply > email and then delete this email message. Any disclosure, copying, > distribution or use of the information contained in this email message to or > by anyone other than the intended recipient is strictly prohibited. Any views > expressed in this message are those of the individual sender, except where > the sender specifically states them to be the views of the Company. > > > _______________________________________________ > NOTICE: THIS MAILING LIST IS BEING SWITCHED TO GOOGLE GROUPS, please register > and consider posting at https://groups.google.com/forum/#!forum/neo4j > > Neo4j mailing list > User@lists.neo4j.org > https://lists.neo4j.org/mailman/listinfo/user _______________________________________________ NOTICE: THIS MAILING LIST IS BEING SWITCHED TO GOOGLE GROUPS, please register and consider posting at https://groups.google.com/forum/#!forum/neo4j Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user