One more thing, I am now testing this code outside of mod_perl and
getting the same results.

On 4/11/07, Derek Watson <[EMAIL PROTECTED]> wrote:
> > No, the Manager does no caching.  Given the code you posted, I can't
> > see a way that this could ever happen.  Map records only (optionally,
> > and not by default) appear when you're asking for a many-to-many
> > relationship in your Manager call using the with_objects or
> > require_objects parameters.  Can you give me some working sample code
> > that reproduces the problem?
>
> I'll try my best to come up with that test code, but it will be sort
> of complicated. I believe the problem has something to do with many
> classes having many_to_many relationships pointing to the same class,
> for example
>
> My::DBO::Package defines
>   relationships =>
>   [
>     items =>
>     {
>       type        => 'many to many',
>       map_class   => 'My::DBO::PackageItemMap',
>       map_from    => 'package',
>       map_to      => 'item',
>       manager_args=> { with_map_records => 1, },
>     },
>
>   ],
>
> and My::DBO::Person also defines
>   relationships =>
>   [
>     items =>
>     {
>       type        => 'many to many',
>       map_class   => 'My::DBO::PersonItemMap',
>       map_from    => 'person',
>       map_to      => 'item',
>       manager_args=> { with_map_records => 1, },
>     },
>   ],
>
> My test case is now as simple as:
>
> my $item = My::DBO::Item->new;
> die $item->map_record; # My::DBO::PackageItemMap=HASH(0xa919514)
>
> When I comment out the with_map_records line in PackageItemMap and run
> the test again:
>
> my $item = My::DBO::Item->new;
> die $item->map_record; # My::DBO::PersonItemMap=HASH(0xa919514)
>
> It goes to the next in the chain.  If I comment out all with_map_records,
>
> Can't locate object method "map_record" via package "My::DBO::Item" at
> /usr/lib/perl5/site_perl/5.8.8/Rose/DB/Object.pm line 1500
>
> Thank you in advance for any insight you may have. I believe my class
> setup is cross-wired somehow.
>

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