[Seaside] defining relationships...
sergio_101
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 ..
for example..
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
these relationships...
and how would i grab all songs that belong to a particular album?
ie..
how would i say:
give me all fleetwood mac albums
or
give me all songs on the album 'tusk'
or
give me all albums that "don't stop" shows up on
thanks so much!
--
----
peace,
sergio
photographer, journalist, visionary
http://www.coffee-black.com
http://www.painlessfrugality.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101
More information about the seaside
mailing list