create_from_cgi question
[prev]
[thread]
[next]
[Date index for 2004/11/03]
I want to create an object from cgi but add hash of column/values that I cannot
get from cgi to be used in creating the object.
For an example: I have one big employee form with person, usr, and employee
fields. employee has a prsn and usr. So i want to say something like
$prsn = Person->create_from_cgi($h);
$usr = Usr->create_from_cgi($h);
# add a hash of other columns/values for this object in addition to cgi_params
employee = Employee->create_from_cgi($h, {prsn_id => $prsn, usr_id=>$usr}); ##
How do people accomplish something like this?
(currently i have this in place of 3rd line. But there has to be a better way.)
employee = Employee->create_from_cgi($h);
employee->prsn_id = $prsn;
employee->usr_id = $usr;
employee->update;
=====
pjs
__________________________________
Do you Yahoo!?
Check out the new Yahoo! Front Page.
www.yahoo.com
|
(message missing)
|
|
|
create_from_cgi question
Peter Speltz 22:34 on 03 Nov 2004
|