[Dbix-class] InflateColumn::DateTime
Mark Hedges
hedges at ucsd.edu
Thu Jun 8 20:28:30 CEST 2006
On Thu, 8 Jun 2006, Christopher H. Laco wrote:
>
> I agree. The second version/error seems kind of obvious, and I'm sure
> isn't the normal way of doing things.
>
> It's the first version/error that's really throwing me here.
>
> Time to start digging...
Hmm yes you're right, you were already on the right track with
your manual subs and I didn't read far enough in.
Your copying block seems really complicated.
> $order->storage->create_related($order->item_relationship, \%copy);
> # error get's thrown in line above
> # ->storage is the resultset result / schema item
But hmm, from DBIx::Class::Relationship::Base manpage --
create_related
my $new_obj = $obj->create_related('relname', \%col_data);
Creates a new item, similarly to new_related, and also inserts the
item's data into your storage medium. See the distinction between "cre-
ate" and "new" in DBIx::Class::ResultSet for details.
So shouldn't the line more simply be:
$order->create_related($order->item_relationship, \%copy);
Dunno. Grasping at straws.
Mark
More information about the Dbix-class
mailing list