Quoting Fernando Perez <[email protected]>:
> 
> Hmm, actually I just watched the railscasts about the counter_cache, and 
> in his log he also has this redundant SELECT that he didn't even spot.
> 
> So I guess this could be an additional feature added to Rails to save 1 
> DB query.

Is the title declared unique?  Then Rails queries the DB to check that there
is no existing record before doing the UPDATE.

HTH,
  Jeffrey

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to