andreasronge/neo4j — Issue #111: undefined method `add_unpersisted_outgoing_rel' 
Author: andreasronge
Created: 2011-12-16 10:22:39+00:00
State: open

When saving a model:

```
undefined method `add_unpersisted_outgoing_rel' for nil:NilClass
org/jruby/RubyBasicObject.java:1677:in `method_missing'
activesupport (3.1.3) lib/active_support/whiny_nil.rb:48:in `method_missing'
/Users/dnagir/proj/neo4j/lib/neo4j/rails/relationships/relationships.rb:110:in `add_unpersisted_outgoing_rel'
/Users/dnagir/proj/neo4j/lib/neo4j/rails/rel_persistence.rb:154:in `create'
org/jruby/RubyBasicObject.java:1688:in `__send__'
org/jruby/RubyKernel.java:2114:in `send'
/Users/dnagir/proj/neo4j/lib/neo4j/rails/tx_methods.rb:9:in `create'
/Users/dnagir/proj/neo4j/lib/neo4j/rails/transaction.rb:49:in `run'
/Users/dnagir/proj/neo4j/lib/neo4j/rails/tx_methods.rb:9:in `create'
/Users/dnagir/proj/neo4j/lib/neo4j/rails/callbacks.rb:39:in `create_with_callbacks'
activesupport (3.1.3) lib/active_support/callbacks.rb:414:in `_run_create_callbacks'
/Users/dnagir/proj/neo4j/lib/neo4j/rails/callbacks.rb:39:in `create_with_callbacks'
/Users/dnagir/proj/neo4j/lib/neo4j/rails/rel_persistence.rb:136:in `create_or_update'
/Users/dnagir/proj/neo4j/lib/neo4j/rails/callbacks.rb:35:in `create_or_update_with_callbacks'
activesupport (3.1.3) lib/active_support/callbacks.rb:416:in `_run_save_callbacks'
/Users/dnagir/proj/neo4j/lib/neo4j/rails/callbacks.rb:35:in `create_or_update_with_callbacks'
/Users/dnagir/proj/neo4j/lib/neo4j/rails/rel_persistence.rb:16:in `save'
/Users/dnagir/proj/neo4j/lib/neo4j/rails/validations.rb:13:in `save'
/Users/dnagir/proj/neo4j/lib/neo4j/rails/relationships/storage.rb:208:in `persist'
org/jruby/RubyArray.java:1612:in `each'
/Users/dnagir/proj/neo4j/lib/neo4j/rails/relationships/storage.rb:207:in `persist'
/Users/dnagir/proj/neo4j/lib/neo4j/rails/relationships/relationships.rb:7:in `write_changed_relationships'
org/jruby/RubyHash.java:1218:in `each_value'
/Users/dnagir/proj/neo4j/lib/neo4j/rails/relationships/relationships.rb:6:in `write_changed_relationships'
/Users/dnagir/proj/neo4j/lib/neo4j/rails/persistence.rb:168:in `init_on_create'
/Users/dnagir/proj/neo4j/lib/neo4j/rails/persistence.rb:158:in `create'
```