rsim/oracle-enhanced — pull request #119 by substars (2011-11-08 18:14:33+00:00)
Title: attr_readonly support + LOB dirty checking

(recreated after fat-fingering a merge :( )

We ran into some strange deadlocking problems in our app, and it turns out they were caused by OCI streaming CLOB data on every AR save irrespective of whether it had changed. My first thought was to attr_readonly the field, but the adapter didn't look at that setting, either.

So this makes attr_readonly work with LOB data and also doesn't stream LOBs back into the DB unless they've changed.

Should we also make the dirty checking dependent on AR partial updates being turned on? I have mixed feelings about this, but it would be pretty easy to do.