I'm using
merb_gems_version = "1.0.3"
dm_gems_version   = "0.9.7"

If my model uses associations (either has 1 or has n) and I try to
store an instance in session[], I get the marshal_dump error.
Googling for that error message leads to a post by Ezra from April
2006 (!) responding to a guy with the same problem in Rails, Ezra says

You cannot marshal objects that have procs or lambdas in them. Its a
current limitation of the ruby interpreter. What exactly are you
storing in the session? Whole objects? Or just id's? SHow me what
you
are storing in the session and I can help you figure it out.

Ok, I guess it's still a limitation.  I haven't read enough Datamapper
code to understand why it puts Procs in the object when associations
are declared but this seems like a fairly big deal to me.  (BTW,
session storage works fine until associations are declared, then
breaks even if no associations are actually present for the object.)

Why a big deal?  I need to store partly built objects somewhere when
they're complex enough to require several pages to get defined.  I
really don't want to save partly built objects to the repository so I
can store only their id in the session.  It causes lots of cruft, it's
hairy, etc.

Are others seeing this?  Looks like others are seeing this issue in
memcache & some other places.  What are people doing about it?
Pointers to workarounds would be most welcome!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"merb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/merb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to