NoBrainerORM / nobrainer

Ruby ORM for RethinkDB
http://nobrainer.io/
Other
387 stars 49 forks source link

Can't save self-referential belongs_to #184

Closed ajselvig closed 8 years ago

ajselvig commented 8 years ago

If I have a Foo model with belongs_to :foo association that references the same model, I cannot save an instance of that model if its foo_id=id (because that foo doesn't exist in the db yet). Is there any way we can skip this validation in this specific case?

I can provide a complete code example if needed.

ajselvig commented 8 years ago

A gentleman and a scholar, as usual. Thanks!

nviennot commented 8 years ago

ahah thanks andy :D