I have a situation where I am encountering a fragmented edi transaction. What results is that I attempt to INSERT a row for which I am missing some data. The columns affected all have sensible DEFAULT values but most also have a NOT NULL constraint. My problem is that notwithstanding I am not initializing those columns in my program, ActiveRecord is nonetheless setting them to NULL for the generated INSERT statement. I can see that this is the case because I initialize from a hash and the hash contents displayed immediately before the failing INSERT does not contain the attribute that is causing the exception. Because that column is explicitly set to NULL in the INSERT statement its DEFAULT value is not used and the NOT NULL constraint is triggered. Now, it is possible that I am misinterpreting what I am seeing. My question is: Does ActiveRecord, or some other part of the RoR DBMS interface, actually explicitly set missing attributes to NULL on INSERT rather than simply ignoring them? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.