diff options
author | Michael Koziarski <michael@koziarski.com> | 2007-01-05 23:42:03 +0000 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2007-01-05 23:42:03 +0000 |
commit | b4282df966b5b5aa9ce0335662a6c68308a1af43 (patch) | |
tree | 6fa8911b4870717756ef9f59708f538636d7591f /activerecord | |
parent | 2228fdbbae81b4a78c3b5ce687cc670026044a90 (diff) | |
download | rails-b4282df966b5b5aa9ce0335662a6c68308a1af43.tar.gz rails-b4282df966b5b5aa9ce0335662a6c68308a1af43.tar.bz2 rails-b4282df966b5b5aa9ce0335662a6c68308a1af43.zip |
Fix the Oracle adapter for serialized attributes stored in CLOBs. Closes #6825 [mschoen, tdfowler]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5866 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/CHANGELOG | 2 | ||||
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/oracle_adapter.rb | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG index ab51f34005..3f729a42d4 100644 --- a/activerecord/CHANGELOG +++ b/activerecord/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Fix the Oracle adapter for serialized attributes stored in CLOBs. Closes #6825 [mschoen, tdfowler] + * [DOCS] Apply more documentation for ActiveRecord Reflection. Closes #4055 [Robby Russell] * [DOCS] Document :allow_nil option of #validate_uniqueness_of. Closes #3143 [Caio Chassot] diff --git a/activerecord/lib/active_record/connection_adapters/oracle_adapter.rb b/activerecord/lib/active_record/connection_adapters/oracle_adapter.rb index bd09d31ce1..def2a69256 100644 --- a/activerecord/lib/active_record/connection_adapters/oracle_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/oracle_adapter.rb @@ -48,6 +48,7 @@ begin if connection.is_a?(ConnectionAdapters::OracleAdapter) self.class.columns.select { |c| c.sql_type =~ /LOB$/i }.each { |c| value = self[c.name] + value = value.to_yaml if unserializable_attribute?(c.name, c) next if value.nil? || (value == '') lob = connection.select_one( "SELECT #{c.name} FROM #{self.class.table_name} WHERE #{self.class.primary_key} = #{quote_value(id)}", |