[CDBI] TEMP columns not persisting through $self->add_to_<something>s

Perrin Harkins perrin at elem.com
Tue May 15 00:40:03 BST 2007


On 5/14/07, Berg, Eric <eric.berg at lehman.com> wrote:
> Test->has_many(actions => 'Action');
> $action = $test->add_to_actions($action_parameters);
>
> Now, at this point, the $action object is in tact, but when I return
> from the method (a method of Test, btw) that does the add_to_actions(),
> the actions are empty, so we'd have to go back to the db to get the
> data...only it's not in there, because they're temp columns.
>
> Why do my TEMP columns disappear in the middle of the execution of a
> program?

Not sure I'm following.  Are you saying that you don't return the
actions you created here, but then you fetch them from the db
somewhere else and they don't contain the temp data?  Temp columns are
not saved at all.  They only keep their value until the object goes
out of scope.

- Perrin



More information about the ClassDBI mailing list