Re: [Rails-core] Unit Tests for active record fail with mysql

2006-07-22 Thread Chris Mear
On 22 Jul 2006, at 7:58 am, Daniel N wrote: ActiveRecord::StatementInvalid: Mysql::Error: #HY000Field 'type' doesn't have a default value: INSERT INTO projects (`name`, `id`) VALUES ('Active Record', 1) #with different insert statements Are you running MySQL 5? Someone else reported a simi

Re: [Rails-core] #5209 patch: :dependent => :nullify deletes child records

2006-07-20 Thread Chris Mear
On 20 Jul 2006, at 9:55 am, Rimantas Liubertas wrote: On 7 Jun 2006, at 6:36 am, Chris Mear wrote: A couple of weeks ago I noticed a bug with :dependent => :nullify on a has_many or has_one. When you delete the parent, the children's foreign keys are nullified, as expected. But

Re: [Rails-core] #5209 patch: :dependent => :nullify deletes child records

2006-07-20 Thread Chris Mear
On 7 Jun 2006, at 6:36 am, Chris Mear wrote: A couple of weeks ago I noticed a bug with :dependent => :nullify on a has_many or has_one. When you delete the parent, the children's foreign keys are nullified, as expected. But when you do parent.child.delete or parent.childr

[Rails-core] New records now considered equal if their attributes are equal (ActiveRecord, r4552)

2006-07-05 Thread Chris Mear
Hello list, In light of this recent change: --- lib/active_record/base.rb (revision 4551) +++ lib/active_record/base.rb (revision 4552) @@ -1646,8 +1646,9 @@ def ==(comparison_object) comparison_object.equal?(self) || (comparison_object.instance_of?(self.class) &&

[Rails-core] #5209 patch: :dependent => :nullify deletes child records

2006-06-07 Thread Chris Mear
Hi everyone, A couple of weeks ago I noticed a bug with :dependent => :nullify on a has_many or has_one. When you delete the parent, the children's foreign keys are nullified, as expected. But when you do parent.child.delete or parent.children.clear, ActiveRecord actually deletes the chil