So I've got an ActiveRecord model pointing to a MySQL db, with an
auto-serialized column ("serialize :columnName").

Thing is, MySQL, depending on how it's configured (like, by default),
has a bad habit of just truncating your data if it's too wide for the
column, with no error raised. Yeah, I can probably reconfigure MySQL
and/or my AR connection to it. But I'm wanting to distribute this code
to all kinds of people who won't think of that or won't want to do that,
I'd really like it to work with the default setup.

But obviously, if a yaml serialization gets truncated, it's not going to
unserialize very well.

At the point of insert/update, is there any good way for me to detect
that the serialization was too big for the column, even though MySQL
isn't complaining?
-- 
Posted via http://www.ruby-forum.com/.

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

Reply via email to