John Siracusa scribbled on 12/15/06 12:33 PM:
> First, you don't need to manually use() related modules.  (In fact,
> you probably shouldn't.)  They'll be use()d for you in the order
> required.
> 
> On 12/15/06, Peter Karman <[EMAIL PROTECTED]> wrote:
>> package AL::Fresco::StoreOrder;
>>
>> use base qw(AL::Fresco::DB::Object);
>>
>> use AL::Fresco::StoreOrdersProducts;
>   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Don't need that
> 
> ...and so on for each related module you explicitly use.
> 

thanks.
the doc here:
http://search.cpan.org/~jsiracusa/Rose-DB-Object-0.758/lib/Rose/DB/Object/Metadata/Relationship/ManyToMany.pm

makes special mention of needing to 'use' the classes involved in the map. 
That's why I was use()ing them.

> As for your error, it's here:
> 
>> package AL::Fresco::StoreOrder;
>> [...]
>>      relationships => [
>>
>>                products => {
>>                           #column_map => {store_order_id => 'id'},
>>                           #foreign_class => 'AL::Fresco::StoreProduct',
>>                           map_class => 'AL::Fresco::StoreOrdersProducts',
>>                       --> map_from  => 'product',
>>                       --> map_to    => 'order',
>>                           type      => 'many to many',
> 
> The "products" relationship in StoreOrder should be using the
> StoreOrdersProducts map class to map from "order" to "product".  You
> have the reverse.

duh! thanks. that works beautifully now.

all kinds of magic. thanks again for your labors, John.

pek
-- 
Peter Karman  .  http://peknet.com/  .  [EMAIL PROTECTED]

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to