andreasronge/neo4j — Issue #137: has_list << isn't wrapped in a transaction
Author: dnagir
Created: 2012-01-17 01:19:46+00:00
State: open
Labels: bug

```ruby
class Person < ::Neo4j::Model
has_list :seen_before
end

he = Person.create
he.seen_before << Person.create
```

Raises exception on the last line:

```
NativeException:
org.neo4j.graphdb.NotInTransactionException: null
# org/neo4j/kernel/impl/index/IndexConnectionBroker.java:49:in `acquireResourceConnection'
# org/neo4j/index/impl/lucene/LuceneIndex.java:78:in `getConnection'
# org/neo4j/index/impl/lucene/LuceneIndex.java:125:in `add'
# org/neo4j/index/lucene/LuceneTimeline.java:100:in `add'
# /Users/dnagir/proj/neo4j/lib/neo4j/has_list/mapping.rb:122:in `<<'
```