andreasronge/neo4j — pull request #320 by ni-ka (2014-02-08 01:58:13+00:00)
Title: Implemented validates_uniqueness_of

Ok sorry for the duplicate work but most of it was done before I discovered the other push request.

This one has nothing to do with constraints. I adapted the impl and tests from the mongo mapper gem. However it requires https://github.com/andreasronge/neo4j-core/pull/45 for the case insensitive uniqueness.

The test "should not raise an error if value is nil" required me to add a nil check as Class.all(:value => nil) throws an error. Not sure what ActiveRecord does there...