I have an object that has a fairly complex tree of objects that is related to it via a polymorphic has_one relationship. 1) Am I guaranteed that all of the subordinate objects will be saved to the database when I call save! on this object? 2) If the answer to #1 is no, what are the conditions under which I can expect changes to be saved to subordinate objects? I keep expecting saves to cascade and sometimes they don''t seem to, and I want to understand why this is happening. Thanks, Wes -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi, 2006/12/20, Wes Gamble <rails-mailing-list@andreas-s.net>:> I keep expecting saves to cascade and sometimes they don't seem to, and > I want to understand why this is happening.See "Unsaved objects and associations" on http://api.rubyonrails.com/classes/ActiveRecord/Associations/ClassMethods.html Hope that helps ! -- Franois Beausoleil http://blog.teksol.info/ http://piston.rubyforge.org/ --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Francois, Thanks for this. My situation is arising after I''ve already been through one save cycle already, such that the entire object graph has been saved once. Do you know what should happen then if I save the object at the root of the object graph? Wes -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---