Mmh, maybe this could be in some Utilities class? Seems a good thing to be able to clone a graph ...
Cheers, /peter neubauer GTalk: neubauer.peter Skype peter.neubauer Phone +46 704 106975 LinkedIn http://www.linkedin.com/in/neubauer Twitter http://twitter.com/peterneubauer http://www.neo4j.org - Your high performance graph database. http://startupbootcamp.org/ - Öresund - Innovation happens HERE. http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. On Thu, Mar 3, 2011 at 12:08 PM, Axel Morgner <[email protected]> wrote: > Hi Balazs, > > you have to manually copy all nodes and relationships from one to the > other database. I have written a tool for that and posted some code here > [1]. > > But take care, in the posted version in [1], relationship properties > were not copied. To fix that, you have to replace > > s.createRelationshipTo(e, r.getType()); > > by > > Relationship newRelationship = > s.createRelationshipTo(e, r.getType()); > > for (String key : r.getPropertyKeys()) { > newRelationship.setProperty(key, r.getProperty(key)); > } > > I hope this is useful for you. > > Greetings > > Axel > > [1] http://lists.neo4j.org/pipermail/user/2010-November/005478.html > > On 03.03.2011 11:35, Balazs E. Pataki wrote: >> Hi, >> >> I have a big database based on Neo4J 1.2. Now, if I would like to use >> the "short strings" feature of Neo4j 1.3 M03 I should regenerate my full >> database, that is all strings should be reset so that it may or may not >> be stored according to the new "short strings" policy. >> >> It seems to me that the easiest way to do this would be to somehow be >> able to copy the full 1.2 database to a newly created 1.3 M03 database >> by traversing the 1.2 database. But there maybe a simpler (neo4j >> builtin) way to do this. Any hints about this? >> >> Thanks, >> --- >> balazs >> _______________________________________________ >> Neo4j mailing list >> [email protected] >> https://lists.neo4j.org/mailman/listinfo/user > > _______________________________________________ > Neo4j mailing list > [email protected] > https://lists.neo4j.org/mailman/listinfo/user > _______________________________________________ Neo4j mailing list [email protected] https://lists.neo4j.org/mailman/listinfo/user

