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.

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.

You rarely need to specify map_from/map_to on many-to-many
relationships.  (They're only required when there's ambiguity, e.g.
two foreign keys pointing to the same table.)  Just omit those
attributes to avoid this kind of mistake in the future.

-John

-------------------------------------------------------------------------
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