When I try, by testing, to persist a model to a in-memory sqlite database with a duplicated primary key, it raises a DataObjects::IntegrityError, and the docs says "...datamapper returns true or false for all operations manipulating the persisted state of a resource (#create, #save, #update and #destroy). If you want it to raise exceptions instead, you can instruct datamapper to..."
I checked in my model:
DataMapper::Model.raise_on_save_failure # false
Zoo.raise_on_save_failure # false
zoo.raise_on_save_failure # false
So, how can I get the expected default behaviour?
When I try, by testing, to persist a model to a in-memory sqlite database with a duplicated primary key, it raises a DataObjects::IntegrityError, and the docs says "...datamapper returns true or false for all operations manipulating the persisted state of a resource (#create, #save, #update and #destroy). If you want it to raise exceptions instead, you can instruct datamapper to..."
I checked in my model:
DataMapper::Model.raise_on_save_failure # false
Zoo.raise_on_save_failure # false
zoo.raise_on_save_failure # false
So, how can I get the expected default behaviour?