On Mon, 2005-12-19 at 14:46 +1100, Kim Ryan wrote:
> Hi,
> 
> This is probably a very simple question, but am still unsure how to do 
> what I want.
> 
> I have a table called tests with a column called code, which holds the 
> code id
> Another table, result_code has a primary key called code, plus a column
> called description
> 
> When I  view the tests table, I would like to see the code description 
> rather than the code id.
> 
> Am trying the following, but the code id is still displayed.
> MyDB::Tests->has_a(code => "MyDB::result_code");
> 
> Do I have to refer to the column to display form the result of the join, 
> such as
> MyDB::Tests->has_a(code => "MyDB::result_code::description");

You should redefine how your table is stringified. Look for
stringify_column in Maypole::Model::CDBI (documentation seems to have
gone walkabout?) or stringify_self in Class::DBI. Or it may work if you
just change the name of the column to name instead of description.

HTH, Got to dash.
Dave



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Maypole-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maypole-users

Reply via email to