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

_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/

Reply via email to