Sorry minor typo I've corrected it.
----- Original Message -----
From: Christopher Rankin
To: maypole-users@lists.sourceforge.net
Sent: Monday, December 11, 2006 8:46 PM
Subject: [Maypole] Relationships not showing up
I'm declaring my table relationships in my "driver" class, and for the most
part they work flawlessly. But for one class the relationships aren't working
when I enter the variables in the templates. So I rearranged the order I
declare the relationships in my driver class and then it worked for a couple
variables. Is there a trick for getting this to work? To better explain:
package Raymond;
use Maypole::Application qw(Authentication::UserSessionCookie);
use Maypole::Constants;
use Raymond::User;
use Raymond::Lead;
use Raymond::Item;
use Raymond::Estimate;
BEGIN{Raymond->setup(...);
Raymond::User->has_a( lead => 'Raymond::Lead' );
Raymond::SalesRep->has_a( lead => 'Raymond::Lead');
Raymond::Lead->has_a( item => 'Raymond::Item' );
Raymond::Lead->has_a( estimate => 'Raymond::Estimate);
then I untaint them ......
Now If I access a User object from one class I can type in my template
[% user.lead.item %]
[% user.lead.estimate%]
and it will work fine.
Then lets say from the SalesRep class I try to access the exact same variable
[% salesrep.lead.item %]
[% salesrep.lead.estimate %]
It will only partly work, Maybe salesrep.lead.item will show up fine but
salesrep.lead.estimate wont ! So I tried just switching the order I declare the
relationships.
Raymond::Lead->has_a( estiamte => 'Raymond::Estimate);
Raymond::Lead->has_a( item => 'Raymond::Item);
then all of a sudden it works. Now that's good news but the problem is I have
like 4 more rows in that table and one may work " lead.estimate ", but "
lead.firstname " , " lead.lastname " won't show up even though I declared their
relationship. So it only partly fixes it if I rearrange the declaration. I have
a good number of relationships and to rearrange them all for the perfect order
is too tedious a job.
Is there any way to fix this
Chris
------------------------------------------------------------------------------
-------------------------------------------------------------------------
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
------------------------------------------------------------------------------
_______________________________________________
Maypole-users mailing list
Maypole-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/maypole-users
-------------------------------------------------------------------------
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
_______________________________________________
Maypole-users mailing list
Maypole-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/maypole-users