Re: Possible imrovement to Class::DBI::retrieve
[prev]
[thread]
[next]
[Date index for 2005/06/10]
On 6/9/05, leif.eriksen@xxx.xxx.xx <leif.eriksen@xxx.xxx.xx> wrote:
> my $item =3D Item->create({Id=3D>1, Area=3D>'Vic', Box=3D>$box}); #$box->=
isa('Box'), not a simple scalar
Try it this way:
my $item =3D $box->add_to_items({Id=3D>1, Area=3D>'Vic'});=20
The add_to_items is automatically created for you when you setup a
has_many relationship. It will automatically fill in the foreign key
for you.
Cheers,
Cees
|
|
Re: Possible imrovement to Class::DBI::retrieve
Cees Hek 03:38 on 10 Jun 2005
|