Re: [Neo4j] node.hasProperty("foo") causes NotInTransactionException? (2.0.0)

2014-01-03 Thread M. David Allen
> The only way I think where you get them to "not-mix" is to never return database objects from a cypher query, just primitive values, collections and maps. Like it currently is in the http API. That's exactly what I'm suggesting. It'd be a pretty big change, but that's the way to do it, and h

Re: [Neo4j] node.hasProperty("foo") causes NotInTransactionException? (2.0.0)

2014-01-03 Thread Michael Hunger
Fully agree with you. In both regards. Cypher will get smarter and faster over time but you will always be able to beat it with hand written assembler (aehm SPI code) for certain use-cases (the 10% or 5% case hopefully). The only way I think where you get them to "not-mix" is to never return da

Re: [Neo4j] node.hasProperty("foo") causes NotInTransactionException? (2.0.0)

2014-01-03 Thread M. David Allen
I get what you're saying with "being between worlds", and why that requires you to use transactions. General database nerd stuff ahead...correct me if I'm wrong on this, but... Cypher is a declarative language, where you specify what you want, but you don't get to specify how the engine goes ab

Re: [Neo4j] node.hasProperty("foo") causes NotInTransactionException? (2.0.0)

2014-01-03 Thread Michael Hunger
Right, the same happens in Neo4j if you use cypher (comparable to SQL). But if you use the java-API you kind are below the query language level (somewhere where you would never get in a rdbms) and there tx-management is manual. In general we want to move away from the Java-API to a more query l

Re: [Neo4j] node.hasProperty("foo") causes NotInTransactionException? (2.0.0)

2014-01-03 Thread M. David Allen
Thanks to both of you for those responses. They totally make sense. Like many people, I'm riding the learning curve with graph databases. I've been doing RDBMS work forever, and only working with neo4j for about a year and a half, and there's still so many things I don't know yet. RE: the use

Re: [Neo4j] node.hasProperty("foo") causes NotInTransactionException? (2.0.0)

2014-01-02 Thread Michael Hunger
Thanks a lot Johannes for chiming in. Adding transactions for reads is mostly about creating the foundations for - repeatable reads, - better resource management - allowing support for more isolation levels - better automatic locking The move from try - finally to try - with and AutoClosable was

Re: [Neo4j] node.hasProperty("foo") causes NotInTransactionException? (2.0.0)

2014-01-02 Thread Johannes Mockenhaupt
On 12/31/2013 04:12 PM, M. David Allen wrote: > Just curious, what's the thinking behind requiring transactions for reads? Since nobody else answered yet I'll take a stab at it :-) As far as I know the reason for requiring transaction for read operations is optimization: fetched resources can be

Re: [Neo4j] node.hasProperty("foo") causes NotInTransactionException? (2.0.0)

2013-12-31 Thread M. David Allen
Just curious, what's the thinking behind requiring transactions for reads? Also, some documentation updates might be appropriate. For example: http://api.neo4j.org/current/org/neo4j/graphdb/NotInTransactionException.html public class NotInTransactionException extends RuntimeException

Re: [Neo4j] node.hasProperty("foo") causes NotInTransactionException? (2.0.0)

2013-12-31 Thread Michael Hunger
Hi Read operation on the database and nodes and relationships now require transactions Probably most sensible to wrap the tx around the entry point to your service layer. HTH Michael Sent from mobile device Am 31.12.2013 um 15:53 schrieb "M. David Allen" : > I'm in the middle of retrofitti

[Neo4j] node.hasProperty("foo") causes NotInTransactionException? (2.0.0)

2013-12-31 Thread M. David Allen
I'm in the middle of retrofitting neo4j code that was running on 1.9.3 to 2.0.0. This is all happening under windows, jdk1.7.0_45, and eclipse. I expected some teething problems and cut-overs; here's one I've run into: org.neo4j.graphdb.NotInTransactionException at org.neo4j.kernel.impl.p