I'm trying to use AR to work with a legacy database, over which I have no control. This database has two problematic table names: 'group' and 'order'. Of course in mysql itself this is really no problem, but AR fails to properly quote the table name in a lot of places. Whether or not it's a "good idea" to have table names like this, some of us are stuck with them.
I've just posted a patch to #4905 to fix this problem comprehensively for MySQL (and the infrastructure to easily fix it for any other database that allows table names like this). The biggest problem, from my point of view, is that you can't use fixtures with a database like this. You also can't dump schema from MySQL in this case, and you have to use a questionable workaround in model classes to get any of AR to work at all. This very much seems to me like something AR should handle more elegantly, since it isn't particularly hard to do. This is my first patch, and the first time I've peeked under the hood of AR, so I'm sure there are places it needs improvement. The patch includes several test cases, all of which fail on the trunk and pass with the patch in place. The full MySQL test suite also passes, but *I have not run tests on other databases*. Thanks, and please feel free to beat me up on this. I'm learning about the rails contribution process here. Geoff --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
