Permalink
Browse files

Merge oracle clob / serialize fix to 1.2

git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/1-2-pre-release@5867 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 25c3ee4 commit e76eae612f23d203edcd97384c232df5aa123cdf @NZKoz NZKoz committed Jan 5, 2007
Showing with 3 additions and 0 deletions.
  1. +2 −0 activerecord/CHANGELOG
  2. +1 −0 activerecord/lib/active_record/connection_adapters/oracle_adapter.rb
View
@@ -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]
@@ -48,6 +48,7 @@ def write_lobs() #:nodoc:
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)}",

0 comments on commit e76eae6

Please sign in to comment.