datamapper/dm-core — Issue #168: recursive saving fails for STI associations
Author: FND
Created: 2011-12-08 09:47:00+00:00
State: open

... at least that's what it seems like.

Here's a reduced test case:
https://gist.github.com/1442692
The last few lines should illustrate the issue. (If not, please let me know so I can elaborate.)

FWIW, an [earlier, simpler test case](https://gist.github.com/1442692/c3f22792823528f8409b7895ab9088ea874979a6) exhibited the same issue, but @markiz managed to [fix](https://gist.github.com/1442832) (or work around?) that.

On IRC, @markiz concluded, based on a previous (if old and possibly outdated) [ticket](http://datamapper.lighthouseapp.com/projects/20609/tickets/940-datamapper-010-does-not-recursively-save-parent-resources), that it might be best to manually traverse the object graph and save the respective objects.

I'm happy to accept that as the recommended solution, but figured it might be worth discussing explicitly.