On Oct 8, 2009, at 5:22 AM, LadyBug wrote:
> > Correct. It seems I hit the STI bug, #345 to be exact. > > I have played with the hobo_migration generator some more and I have > to say, I can't see the real value of it. It seems to work OK for very > basic stuff, but if I have somewhat complicated models and > relationships (including STI and models with associations like > belongs_to or has_many or even HABTM), it can't handle those and I > have to create the migration files for those by hand anyway. Not to > mention that there seems to be a problem, where it keeps on generating > migrations for datetime fields with :default-values (bug submitted). > Too much pain for too little gain. > Out of curiosity, what was the issue you encountered with belongs_to and has_many? The belongs_to should be generating the correct field(s) automatically; if it isn't, something's broken. HABTM is trickier, but I've got the start of a patch in my Hobo fork (right now, it just ignores HABTM tables, but that's better than trying to drop them all the time..). HABTM wasn't a priority before because there wasn't any way to reliably infer what fields should be in the table (the old "decorated join table" stuff), but now that Rails 2.3 has deprecated (maybe removed) that stuff, it should be possible to create join table migrations automatically. --Matt Jones --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Hobo Users" 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/hobousers?hl=en -~----------~----~----~----~------~----~------~--~---
