[Seaside] generating relationships

Steve Aldred aldreds at velocitynet.com.au
Thu May 14 14:19:14 UTC 2009


On 14/05/2009 11:58 PM +10:00, sergio_101 wrote:
>>
>> just relate the objects in instance variables. In collections when N 
>> and one
>> when one :)
>
> so, in albums, i would have something like artistID?

More likely you'd have an artist with a collection of albums and a 
collection of fans. Forget ids in an OODBMS reference the actual object.

>
> is there something like the rails 'find' function build in? so i could 
> do something like..
> Album.find(albumID).artist


You need to decide what is/are your root object/s. Use global to hold 
the collection of root objects. You find stuff by doing detect/select 
etc on that collection.

HTH
Steve


More information about the seaside mailing list