[Dbix-class] InflateColumn::DateTime
Christopher H. Laco
claco at chrislaco.com
Thu Jun 8 20:31:02 CEST 2006
Mark Hedges wrote:
> 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
>
>
my ->storage() != dbic ->storage().
my ->storage() returns the actual schema table result.
-=Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : http://lists.rawmode.org/pipermail/dbix-class/attachments/20060608/76067612/attachment.pgp
More information about the Dbix-class
mailing list