[Maypole] many to many relationships

Drew Taylor drew@drewtaylor.com
Mon, 07 Jun 2004 10:31:52 -0400


Make sure you use the latest CPAN release (currently 0.96), which has 
tons of important (and good and useful!) changes since 0.60.

Drew

Marcus Ramberg wrote:

> The relationship bit of cdbi has changed in 0.60 of Class::DBI . Search 
> the list for 'proper related function' to find a patch.
> 
> Marcus
> 
> Carsten Øland Madsen wrote:
> 
>> Sorry, I was to fast on the trigger
>>
>> Doing
>>
>> package BeerDB::Pub;
>>
>> sub related { "beers" }
>>
>> return 1;
>>
>> and
>>
>>
>> package BeerDB::Beer;
>> sub related { "pubs" }
>> return 1;
>>
>> Does work, i.e., pubs are listed when a beer is viewed etc.
>>
>> Now how do I add beers to pubs?

-- 
----------------------------------------------------------------
Drew Taylor                 *  Web development & consulting
Email: drew@drewtaylor.com  *  Site implementation & hosting
Web  : www.drewtaylor.com   *  perl/mod_perl/DBI/mysql/postgres
----------------------------------------------------------------