datamapper / dm-yaml-adapter

A YAML Adapter for DataMapper
http://datamapper.org/
MIT License
18 stars 7 forks source link

dm-yaml-adapter handles Serial ids very poorly #1

Closed atduskgreg closed 12 years ago

atduskgreg commented 13 years ago

If you delete an object that has a Serial attribute declared on it, dm-yaml-adapter will generate duplicate ids on the next create. Also, once there are duplicate ids, dm-yaml-adapter's find all will return return the right number of records but with the wrong content (i.e. it will duplicate the values of the first record it finds for all found records).

I have written a spec that demonstrates both of these problems here:

https://gist.github.com/949306

I would have added it to this repo's spec directory but I couldn't figure out how to get all the dm test helpers up and running.

-- Greg

thetamind commented 12 years ago

I ran into this corruption issue using dm-is-list with dm-yaml-adapter.

I integrated a modified version of @atduskgreg's failing spec into my fork

I'm not familiar enough with dm's internals to figure out where the problem would be. Any help?

mbj commented 12 years ago

see https://github.com/datamapper/dm-yaml-adapter/pull/4

-- EDIT

ATsee -> see