Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6689305
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:30:13+00:00 2026-05-26T05:30:13+00:00

I’m trying to update a model object, and it keeps rolling back. Occassionaly protesting

  • 0

I’m trying to update a model object, and it keeps rolling back. Occassionaly protesting that it is a validation error. But it doesn’t point to what is actually failing.

In the end, I tried to delete it, but in the deletion, it still fails validation.

Is there a way to debug this and find out exactly why/what is causing this?

Thanks

A typical response to an update or delete:

ActiveRecord::RecordNotSaved: ActiveRecord::RecordNotSaved
from /data/HQ_Channel2/releases/20111011173855/vendor/rails/activerecord/lib/active_record/base.rb:2551:in `save_without_validation!'
from /data/HQ_Channel2/releases/20111011173855/vendor/rails/activerecord/lib/active_record/validations.rb:1019:in `save_without_dirty!'
from /data/HQ_Channel2/releases/20111011173855/vendor/rails/activerecord/lib/active_record/dirty.rb:87:in `save_without_transactions!'
from /data/HQ_Channel2/releases/20111011173855/vendor/rails/activerecord/lib/active_record/transactions.rb:200:in `save!'
from /data/HQ_Channel2/releases/20111011173855/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in `transaction'

And for more evidence, this is the stack from the appication when I try to create a new object:

Processing OrganizationsController#create (for 127.0.0.1 at 2011-10-12 15:43:02) [POST]
  Parameters: {"commit"=>"submit", "action"=>"create", "authenticity_token"=>"QxTT80hdtULmkt7PeUH5MG+BZ/5l+a22ry3EL49q1V8=", "controller"=>"organizations", "organization"=>{"city"=>"lkjlkj", "name"=>"asdfa", "contact_24"=>"1", "zip"=>"123123", "quick_description"=>"2342, 123, 3,2423, 2", "url"=>"www.martini494bistro.com/", "hq_url"=>"12341234", "map_it"=>"1", "street"=>"lkjlkj", "phone_work"=>"123123123123", "is_authorized"=>"1", "state"=>"NJ"}}
  User Columns (2.2ms)   SHOW FIELDS FROM `users`
  User Load (4.4ms)   SELECT * FROM `users` WHERE (`users`.`persistence_token` = '77ca6dea2961c5102be62d8e995e3f4bfdcb5bcfdf64a4e8361d2f3b49e9b377e6467d1a01a3fbe7fc6dab76382220b044d3782f6045130a2de047d8b8f0bd87') LIMIT 1
  SQL (0.1ms)   BEGIN
  User Update (0.3ms)   UPDATE `users` SET `updated_at` = '2011-10-12 19:43:02', `perishable_token` = 'YP8Ivses9OgR6LtrNBvF', `last_request_at` = '2011-10-12 19:43:02' WHERE `id` = 2953
  Solr Update (7.0ms)   <?xml version="1.0" encoding="UTF-8"?><add><doc><field name="type">User</field><field name="type">ActiveRecord::Base</field><field name="id">User 2953</field><field name="email_s">asdfasdf@asdfasdf.com</field><field name="name_s">asdfadsf adfasdf</field><field name="first_name_s">asdfadsf</field><field name="created_at_d">2011-10-12T19:39:36Z</field><field name="class_name">User</field><field name="last_name_s">adfasdf</field><field name="name_text">asdfadsf adfasdf</field><field name="email_text">asdfasdf@asdfasdf.com</field><field name="last_name_text">adfasdf</field><field name="first_name_text">asdfadsf</field></doc></add>
  SQL (0.6ms)   COMMIT
  SQL (1.1ms)   SHOW TABLES
  Organization Columns (5.4ms)   SHOW FIELDS FROM `organizations`
  Organization Load (2.9ms)   SELECT `organizations`.* FROM `organizations` INNER JOIN `organizations_users` ON `organizations`.id = `organizations_users`.organization_id WHERE ((`organizations_users`.user_id = 2953)) 
  SQL (0.1ms)   BEGIN
  Organization Load (1.1ms)   SELECT `organizations`.id FROM `organizations` WHERE (LOWER(`organizations`.`name`) = BINARY 'asdfa') LIMIT 1
  Organization Load (2.2ms)   SELECT `organizations`.id FROM `organizations` WHERE (LOWER(`organizations`.`hq_url`) = BINARY '12341234') LIMIT 1
  QuickFact Columns (1.3ms)   SHOW FIELDS FROM `quick_facts`
  SQL (2.2ms)   SELECT count(*) AS count_all FROM `quick_facts` WHERE (`quick_facts`.organization_id = NULL) 
  CACHE (0.0ms)   SELECT count(*) AS count_all FROM `quick_facts` WHERE (`quick_facts`.organization_id = NULL) 
  CACHE (0.0ms)   SELECT count(*) AS count_all FROM `quick_facts` WHERE (`quick_facts`.organization_id = NULL) 
  SQL (0.1ms)   ROLLBACK
  SQL (3.1ms)   BEGIN
  CACHE (0.0ms)   SELECT `organizations`.id FROM `organizations` WHERE (LOWER(`organizations`.`name`) = BINARY 'asdfa') LIMIT 1
  CACHE (0.0ms)   SELECT `organizations`.id FROM `organizations` WHERE (LOWER(`organizations`.`hq_url`) = BINARY '12341234') LIMIT 1
  CACHE (0.0ms)   SELECT count(*) AS count_all FROM `quick_facts` WHERE (`quick_facts`.organization_id = NULL) 
  CACHE (0.0ms)   SELECT count(*) AS count_all FROM `quick_facts` WHERE (`quick_facts`.organization_id = NULL) 
  CACHE (0.0ms)   SELECT count(*) AS count_all FROM `quick_facts` WHERE (`quick_facts`.organization_id = NULL) 
  SQL (0.1ms)   ROLLBACK
  CACHE (0.0ms)   SELECT `organizations`.id FROM `organizations` WHERE (LOWER(`organizations`.`name`) = BINARY 'asdfa') LIMIT 1
  CACHE (0.0ms)   SELECT `organizations`.id FROM `organizations` WHERE (LOWER(`organizations`.`hq_url`) = BINARY '12341234') LIMIT 1
  SQL (0.1ms)   BEGIN
  CACHE (0.0ms)   SELECT `organizations`.id FROM `organizations` WHERE (LOWER(`organizations`.`name`) = BINARY 'asdfa') LIMIT 1
  CACHE (0.0ms)   SELECT `organizations`.id FROM `organizations` WHERE (LOWER(`organizations`.`hq_url`) = BINARY '12341234') LIMIT 1
  CACHE (0.0ms)   SELECT count(*) AS count_all FROM `quick_facts` WHERE (`quick_facts`.organization_id = NULL) 
  CACHE (0.0ms)   SELECT count(*) AS count_all FROM `quick_facts` WHERE (`quick_facts`.organization_id = NULL) 
  CACHE (0.0ms)   SELECT count(*) AS count_all FROM `quick_facts` WHERE (`quick_facts`.organization_id = NULL) 
  SQL (0.1ms)   ROLLBACK
  SQL (0.1ms)   BEGIN
  CACHE (0.0ms)   SELECT `organizations`.id FROM `organizations` WHERE (LOWER(`organizations`.`name`) = BINARY 'asdfa') LIMIT 1
  CACHE (0.0ms)   SELECT `organizations`.id FROM `organizations` WHERE (LOWER(`organizations`.`hq_url`) = BINARY '12341234') LIMIT 1
  CACHE (0.0ms)   SELECT count(*) AS count_all FROM `quick_facts` WHERE (`quick_facts`.organization_id = NULL) 
  CACHE (0.0ms)   SELECT count(*) AS count_all FROM `quick_facts` WHERE (`quick_facts`.organization_id = NULL) 
  CACHE (0.0ms)   SELECT count(*) AS count_all FROM `quick_facts` WHERE (`quick_facts`.organization_id = NULL) 
  SQL (0.1ms)   ROLLBACK
Rendering template within layouts/application
Rendering organizations/new
Rendered organizations/_form (4.2ms)
Rendered layouts/_head (2.7ms)
  SQL (0.7ms)   SELECT count(*) AS count_all FROM `organizations` INNER JOIN `organizations_users` ON `organizations`.id = `organizations_users`.organization_id WHERE ((`organizations_users`.user_id = 2953)) 
Rendered layouts/_login_status_new (2.1ms)
Rendered layouts/_header_new (2.9ms)
Rendered layouts/_need_login (0.2ms)
Rendered layouts/_already_have_tooltip (0.1ms)
Completed in 227923ms (View: 34, DB: 29) | 200 OK [http://localhost/organizations]
  SQL (0.1ms)   SET NAMES 'utf8'
  SQL (0.1ms)   SET NAMES 'utf8'
  SQL (0.1ms)   SET SQL_AUTO_IS_NULL=0


Processing DynamicStylesheetsController#image_css to css (for 127.0.0.1 at 2011-10-12 15:46:50) [GET]
  Parameters: {"format"=>"css", "action"=>"image_css", "controller"=>"dynamic_stylesheets"}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T05:30:14+00:00Added an answer on May 26, 2026 at 5:30 am

    At a guess, these lines:

      SQL (2.2ms)   SELECT count(*) AS count_all FROM `quick_facts` WHERE (`quick_facts`.organization_id = NULL) 
      CACHE (0.0ms)   SELECT count(*) AS count_all FROM `quick_facts` WHERE (`quick_facts`.organization_id = NULL) 
      CACHE (0.0ms)   SELECT count(*) AS count_all FROM `quick_facts` WHERE (`quick_facts`.organization_id = NULL) 
      SQL (0.1ms)   ROLLBACK
    

    .. mean that you have a uniqueness validation that’s failing because the null value is “taken”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I've got a string that has curly quotes in it. I'd like to replace
Seemingly simple, but I cannot find anything relevant on the web. What is the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.