2009/2/20 jonah honeyman <[email protected]>: > > I am seeing some weird behavior from datamapper. On some machines (all > with the same exact specs) this runs fine, and on others, well.. this > happens: > Cool. Everything looks great and then > >>> Product.first.category > ~ (0.003962) SELECT `id`, `name`, `slug`, `price`, `original_price`, > `weight`, `quantity`, `in_stock`, `created_at`, `updated_at`, > `image_file_name`, `image_content_type`, `image_file_size`, > `image_updated_at`, `category_id` FROM `products` ORDER BY `id` LIMIT > 1 > ~ (0.000167) SELECT `id`, `name`, `slug` FROM `categories` ORDER BY > `id` > ~ (0.000122) SELECT `id`, `name`, `slug` FROM `categories` ORDER BY > `id` > ~ (0.000165) SELECT `id`, `name`, `slug` FROM `categories` ORDER BY > `id` > ~ (0.000173) SELECT `id`, `name`, `slug` FROM `categories` ORDER BY > `id` > ~ (0.000311) SELECT `id`, `name`, `slug` FROM `categories` ORDER BY > `id` > > Anyone have any ideas?
No ideas I'm afraid, but I had something similar happen in my app a little while ago. I've got stuff mixed into my models, had just updated datamapper then found it started to happen when I added a 'is :state_machine' block into one of my models. I did try and create a cut-down version of the model to demo the bug, but everything worked fine so I assumed it was an issue with one of my mixins (but for the life of me I couldn't workout from running ruby-debug why). But now I'm not so sure as I've re-written the 'offending' part of the app using the same mixins and the problem hasn't re-occurred so far (but I've not added everything back in yet - so I'm just hoping it won't re-emerge later). So if you find out why this is happening please post back to the group as I'd defo find it useful! Cheers Rupert --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "DataMapper" 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/datamapper?hl=en -~----------~----~----~----~------~----~------~--~---
