Hi, I''m having problems with serialize helper method. The data serialization is OK, the problem is when I retrieve the object from database later the serialized attribute is not loaded (=nil). I''m trying to implement the Serialized LOB design pattern, do you think there is a better way to do it? What I''m trying to serialize/deserialize is an array of OpenStruct. Any help will be very appreciated. Thanks in advance, Gustavo Honorato -- 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.
On Apr 2, 2:25 pm, Gustavo de Sá Carvalho Honorato <gustavohonor...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > I''m having problems with serialize helper method. The data serialization is > OK, the problem is when I retrieve the object from database later the > serialized attribute is not loaded (=nil). I''m trying to implement the > Serialized LOB design pattern, do you think there is a better way to do it? > What I''m trying to serialize/deserialize is an array of OpenStruct. >What''s the type of the column that the serialized data is being serialized into? Is it big enough? Fred> Any help will be very appreciated. > > Thanks in advance, > Gustavo Honorato-- 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.
On Sat, Apr 2, 2011 at 1:54 PM, Frederick Cheung <frederick.cheung-Re5JQEeQqe8@public.gmane.orgm> wrote:> > > On Apr 2, 2:25 pm, Gustavo de Sá Carvalho Honorato > <gustavohonor...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Hi, > > > > I''m having problems with serialize helper method. The data serialization > is > > OK, the problem is when I retrieve the object from database later the > > serialized attribute is not loaded (=nil). I''m trying to implement the > > Serialized LOB design pattern, do you think there is a better way to do > it? > > What I''m trying to serialize/deserialize is an array of OpenStruct. > > > What''s the type of the column that the serialized data is being > serialized into? Is it big enough? >It is a text column in MySQL. I''ve checked the database and all data is there.> > Fred > > Any help will be very appreciated. > > > > Thanks in advance, > > Gustavo Honorato > > -- > 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. > >-- 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.
Serialization is OK. I think the problem is in deserialization. 2011/4/2 Gustavo de Sá Carvalho Honorato <gustavohonorato-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>> > On Sat, Apr 2, 2011 at 1:54 PM, Frederick Cheung < > frederick.cheung-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> >> >> On Apr 2, 2:25 pm, Gustavo de Sá Carvalho Honorato >> <gustavohonor...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> > Hi, >> > >> > I''m having problems with serialize helper method. The data serialization >> is >> > OK, the problem is when I retrieve the object from database later the >> > serialized attribute is not loaded (=nil). I''m trying to implement the >> > Serialized LOB design pattern, do you think there is a better way to do >> it? >> > What I''m trying to serialize/deserialize is an array of OpenStruct. >> > >> What''s the type of the column that the serialized data is being >> serialized into? Is it big enough? >> > > It is a text column in MySQL. I''ve checked the database and all data is > there. > > >> >> Fred >> > Any help will be very appreciated. >> > >> > Thanks in advance, >> > Gustavo Honorato >> >> -- >> 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. >> >> >-- 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.