[Seaside] defining relationships...
sergiolist at village-buzz.com
Fri Feb 26 05:33:05 UTC 2010
okay, i am really almost there.. i just need to understand how to
define relationships between models ..
if i have the following objects:
Object subclass: #Artist
instanceVariableNames: 'name formationYear '
Object subclass: #Album
instanceVariableNames: ' albumName releaseDate numberOfSongs duration'
Object subclass: #Song
instanceVariableNames: ' title duration'
in this case...
an artists has many albums
an album has many songs
and a song has and belongs to many albums (it can be on the original
release, or it can be on a best of album)..
so, in this case, how would i define my instance variables to show
and how would i grab all songs that belong to a particular album?
how would i say:
give me all fleetwood mac albums
give me all songs on the album 'tusk'
give me all albums that "don't stop" shows up on
thanks so much!
photographer, journalist, visionary
More information about the seaside