[Dbix-class] Automatically "create" on related tables
Eduard Giménez
egimenez at capside.com
Tue Apr 24 17:49:40 GMT 2007
Hi,
I'm working on a existing DB which has some data spanned across several
tables. For example each user has an entry on the table "users" and on the
"user_data" table. I know that it's not he best option, but It's how the DB
is and I can change it :(
Currently to add a new user I do (on Catalyst, btw):
$u = $c->model('myDB::users')->create( { email => $email, active => 1,
...});
$u->create_related('user_data', {field01 => $field1, field02 => $field02,
...});
I would like to do something similar what is shown at [1]
$c->model('myDB::users')->create( { email => $email,
active => 1,
...
user_data => {field01 =>
$field1,
field02 =>
$field02,
...},
} );
>From that [2] Matt's message I undersant that this feature was going to be
merged. Is that true? Has been already merged? On which DBIx::Class version?
TIA,
[1] http://www.mail-archive.com/dbix-class@lists.rawmode.org/msg02624.html:
[2] http://www.mail-archive.com/dbix-class@lists.rawmode.org/msg02671.html
Eduard Giménez
CAPSiDE
Systems Engineer
egimenez at capside.com
Phone 902 877 803
________________________________
DISCLAIMER: Este mensaje contiene información propietaria de la cual parte o
toda puede contener información confidencial o protegida legalmente. Esta
exclusivamente destinado al usuario de destino. Si, por un error de envío o
transmisión, ha recibido este mensaje y usted no es el destinatario del
mismo, por favor, notifique de este hecho al remitente y borre el mensaje.
Si no es el destinatario final de este mensaje no debe usar, informar,
distribuir, imprimir, copiar o difundir este mensaje bajo ningún medio.
________________________________
DISCLAIMER: This e-mail contains propietary information some or all of which
may be legally privileged. It is for the intended recipient only. If an
addressing or transmission error has misdirected this e-mail, please notify
the author by replying to this e-mail and then delete the email. If you are
not the intended recipient you must not use, disclose, distribute, copy,
print or rely on this e-mail.
________________________________
More information about the Dbix-class
mailing list