Play nice with string primary keys #28

1 commit merged into from Oct 31, 2010


None yet
2 participants


On my quest to make ancestry play nice with string primary keys I have stumbled upon another problem. The method 'ancestor_ids' assumes that it has to cast ids to integers. With string keys this goes wrong.

So here is a patch that will actually make the plugin inspect the model to see how it should cast. Only string columns are handled, everything else is treated as an integer. I suppose support for other kinds of columns could be added, but I'm not sure any other kind of primary key makes sense.

A test has been added to make sure ancestor ids are correct for string columns.

Thank you!


seems to solve my problem in
Finally someone who pays attention to uuids. Just dropped the evaluation of all other tree gems/plugins due to this
Thanks Rolf

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment