RubyFlow The Ruby and Rails community linklog

A nasty DataMapper bug?

Cory O’Daniel claims to have found a massive flaw^H^H^H^H glitch in DataMapper 0.9.6 that results in 90 SQL queries being performed for just one simple lookup. Not being a DataMapper expert myself - is there any merit in this bug?

Update: It has now been fixed in dm-core. Awesome work all round.

Comments

There is some merit to the bug, but it’s not anywhere near a massive flaw. More like a missed use-case.

For anyone interested, I wrote up a quick explanation of what’s happening on the lighthouse ticket: http://wm.lighthouseapp.com/projects/4819-datamapper/tickets/626-using-fields-causes-datamapper-to-generate-tons-of-queries-in-mysql#ticket-626-5.

Flaw was too harsh of a word, I attribute it to lack of sleep.

yeah I’ve come accross this before, try sequel.

This has been fixed in dm-core (e5df3f6).

Again, for anyone interested, you can read a quick summary of the problem at Lighthouse.

Sorry if anyone thought it was too harsh. I was just repeating what I was told over e-mail and felt like it was something worth raising. Awesome job on the fix.

The guy who raised it only cared (much as I do) because DM is going to be such a big deal with Merb 1.0 and we want something that’s totally awesome as an alternative to AR/Rails that people can’t bitch about in a month’s time :)

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in