Discussion:
[Modeling-users] Re: converting object into raw
John Lenton
2004-02-12 14:55:02 UTC
Permalink
Got it: obj.snapshot_raw(), right?
--
John Lenton (***@vialibre.org.ar) -- Random fortune:
What has roots as nobody sees,
Is taller than trees,
Up, up it goes,
And yet never grows?
Sebastien Bigaret
2004-02-12 15:19:00 UTC
Permalink
Post by John Lenton
Got it: obj.snapshot_raw(), right?
Absolutely! Be sure to read its documentation for the
special cases that can happen with primary keys and
foreign keys.

-- Sébastien.
John Lenton
2004-02-12 17:41:11 UTC
Permalink
Maybe this is in the user manual somewhere, but I can't find it, and
neither can google :(

How do I convert an object back into its "raw" form?

I need this because, in a MVC framework we are working on («Cimarrón»,
spanish for maverick---and other things), I have a "search"
widget. This widget knows nothing about Modeling, but the controller
can arrange it such that it feeds off of modeling's "raw" objects, or
rows, and thus is much much faster than otherwise. The widget knows it
has an internal representation of the objet it is showing and it has a
series of parsers/printers (provided by the controller--something like
special-purpose delegates) to convert it to/from the external
representation the controller wants; in the parser, it's simply a
question of calling faultForRawRow(). How do I get the printer?
--
John Lenton (***@vialibre.org.ar) -- Random fortune:
¡Qué amable cosa es el hombre cuando es verdaderamente hombre!
-- Menandro. (343-290 A.C.) Filósofo griego.
Loading...