[Maypole] many to many relationships

Marcus Ramberg marcus@thefeed.no
Mon, 07 Jun 2004 17:14:47 +0200


Sorry, the below should of course be "has changed in 0.96", the Maypole 
patch takes advantage of the new CDBI::Relationship::* structure to get 
a proper list of has_manys
Drew Taylor wrote:

> Make sure you use the latest CPAN release (currently 0.96), which has 
> tons of important (and good and useful!) changes since 0.60.
>
>> 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?
>>
>

--
This e-mail has been protected by Song Networks' virus-scan service:
http://www.securemail.no