> The column objects we currently have are certainly anemic, and I agree
> it'd be nice if the type casting code was pushed out of Base and into
> the adapters.  All things in good time, assuming the caching approach
> works, I'd definitely like to tidy the implementation a little more.
> I definitely like the general shape of:
>
>  attributes_cache['foo'] = self.columns['foo'].serialize(attributes['foo'])
>
> So assuming we don't see any breakage, I'll investigate that kind of a change.

Excellent - that would be great.

> We've discussed partial-row updates in the past here, and they're
> incompatible with model  validations.   Concurrent updates can each
> see a valid state, issue an update, and leave the record invalid.

Hmm.  Thinking out loud, the validations would only check values that
have changed, so that seems ok.  Then when you do an update, you'd
send the key fields and the changed fields.

Now if 2 people tried to update the same record, and ActiveRecord was
doing partial updates, then I could see how might end up in an invalid
state on the database side.  Of course that's easily solved on the
database side - but there would be no way to solve it on the rails
side.

> could definitely be put into a plugin, and I'm happy to roll in any
> hooks needed to simplify that.

A possible hook would be a setter method you could override, or for a
cleaner implementation, fire a changed event when a field is updated.
Then you could roll your own "changed" hash table.

> The fact it hasn't gathered a large number of
> users indicates to me that perhaps it's a bit of a niche feature.

Interesting - ok.

Anyway, I'd agree keeping track of changes is not nearly as important
as separating out serialized/unserialized values in the attributes
hash table and having a good column implementation.

I'm excited you're looking at this, this will be a big improvement for
ActiveRecord.

Charlie


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to