Zhenning Guan
2011-Mar-13 16:20 UTC
how to avoid strip character when store marshal object into table?
I marshal a Model object and store into a table column(text type), it always strip the size into 127. so I can not return a marshal object to model object. how can I make this work? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Frederick Cheung
2011-Mar-13 16:32 UTC
Re: how to avoid strip character when store marshal object into table?
On Mar 13, 4:20 pm, Zhenning Guan <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> I marshal a Model object and store into a table column(text type), it > always strip the size into 127. so I can not return a marshal object to > model object. how can I make this work?you should probably be using a blob column for marshaled objects - you don''t want the database doing character set conversions on it or anything like that Fred> > -- > Posted viahttp://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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Curtis j Schofield
2011-Mar-13 16:48 UTC
Re: how to avoid strip character when store marshal object into table?
On Sun, Mar 13, 2011 at 9:20 AM, Zhenning Guan <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> I marshal a Model object and store into a table column(text type), it > always strip the size into 127. so I can not return a marshal object to > model object. how can I make this work? > >the text column is 2GB- you must not be doing it write show me a ''describe table'' (or ''show create table'') for your table. you probably also don''t want to do this marshall manually. Look into :serializable -- make haste slowly \ festina lente \ - mobile +1_415_632_6001 curtis.schofield-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <curtis-DDU1nqEjlGkHaT8GDLgCUg@public.gmane.org> http://robotarmyma.de -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Zhenning Guan
2011-Mar-14 01:37 UTC
Re: how to avoid strip character when store marshal object into table?
`body` text COLLATE utf8_unicode_ci, -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.