Glad you figured it out.

Hope you are successful it making Neo4j work for you. Don't hesitate to ask 
more.

And I'd be happy if you could blog about the things you're working on.

Michael

Sent from mobile device

Am 13.07.2014 um 05:05 schrieb Adam Golinski <adam.gol1...@gmail.com>:

> Thanks for your reply Michael.
> When I was shortening the 1.5k lines of my code into a form that coule be 
> posted here I have found the solution to the problem.
> 
> The issue was that I stupidly created an object field thix.tx to save myself 
> creating a new variable every time I wanted to do a transaction.
> However at some point I've started using the same transaction in other 
> functions called so I've been successing an closing the transactions 
> somewhere in the middle of the bigger transaction I wanted to perform. See 
> the code below.
> 
> class sth{
>     private GraphDatabaseService db;
>     private Transaction tx;
>     private ExecutionEngine engine;
> 
>     public void sth(){
>         this.engine = new ExecutionEngine(this.db);
>         this.tx = this.db.beginTx();
>         try{
>             this.sth2();
>             this.engine.execute(important_creating_query);
>             this.tx.success();
>         } finally {
>             this.tx.close(); 
>         }
>     }
> 
>     public int sth2(){
>         this.tx = this.db.beginTx();
>         try{
>             this.engine.execute(some_matching_query);
>             this.tx.success();
>         } finally {
>             this.tx.close(); 
>         }
>     }
> }
> 
> I sort of makes sense to me that the creating query in the sth() function 
> wasn't saved in this case.
> 
> I'm sorry for bothering you.
> 
> Anyway, hopefully maybe someone will find a solution in this topic in future.
> 
> Cheers,
> Adam
> 
> 
> On Saturday, 12 July 2014 02:18:34 UTC+1, Michael Hunger wrote:
>> 
>> Please post the code,
>> how do you shut down the db?
>> Are you by chance running a server and your embedded code on the same 
>> database?
>> 
>> 
>> On Fri, Jul 11, 2014 at 5:23 AM, Adam Golinski <adam.g...@gmail.com> wrote:
>>> Hi all!
>>> 
>>> I am experiencing this strange issue of part of my relationships 
>>> disappearing after shutting and reopening Java embedded neo4j db.
>>> I am using neo4j community 2.1.2.
>>> 
>>> The strangest part is that only part of relationships disappear - only 1 
>>> out of 2 labels.
>>> Relationships with this label are created last and it seems as if they were 
>>> not 'commited' to the db.
>>> 
>>> However I am sure they are created since as long as I create them and I 
>>> don't shut the db I can perform other operations I need on them and I am 
>>> getting the results I would expect.
>>> 
>>> What could possibly be the reason of such behaviour?
>>> 
>>> I can post the source code if necessary, it's a bit messy though.
>>> 
>>> Cheers
>>> Adam Golinski
>>> -- 
>>> 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 neo4j+un...@googlegroups.com.
>>> 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 neo4j+unsubscr...@googlegroups.com.
> 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 neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to