[Rails] Is validates_uniqueness_of transaction safe?
by Dparkmit other posts by this author
Aug 13 2007 3:16AM messages near this date
[Rails] Re: Multiblog engine?
|
[Rails] Form Blocks
Hi All,
I've recently starting programming in RoR. Here's a question re: the
ActiveRecord validation methods. Are they transaction safe?
It seems that saving an instance of a model with validation methods
could require multiple db queries. For example,
validated_uniqueness_of would need to do at least one query to figure
out if the value already exists and then the second query to insert a
new record.
Are these queries contained in a single transaction? If not, how do
you make sure that they are part of the same transaction?
Thanks for your help!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Ta
lk" group.
To post to this group, send email to rubyonrails-talk@[...].com
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@[...].com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
|