Hi sergio,<br><br><br>I hope I got your question right because it seems to be an OOP question instead of a Seaside specific one. But let me try :)<br><br>While thinking about your questions. I figured that it would be more easy to answer the questions when an UML diagram would be present. It seems to be important to see the communication directions between each class.<br>
<br>The simplest way would be to hold every communication partner in instance variables. Say you want to know which albums are published by an artists, then you simply need another instanceVariable at artists called &#39;albums&#39;. And you might want to do something like the following in the initialization method of artist:<br>
<br>Artist &gt;&gt; #initialize<br>  super initialize.<br>  self albums: OrderedCollection new.<br><br>Same would go for albums. If you want to be able to see the artist of an album, you need another instanceVariable called &#39;artist&#39;. It would then hold an instance of Artist.<br>
<br><br>Say you now have all the albums in a global Collection, you could do the following in order to get all albums belonging to fleetwood mac:<br><br>albumCollection collect: [:album | album artist name = &#39;Fleetwood Mac&#39;]<br>
<br>You probably could also work with the instance of the artists (which shall be called fleetwoodMac<br><br>albumCollection collect: [:album | album artist = fleetwoodMac]<br><br><br>I hope this would be the right answers for you :)<br>
<br>Regards,<br>Peter<br><br>
<br><div class="gmail_quote">2010/2/26 sergio_101 <span dir="ltr">&lt;<a href="mailto:sergiolist@village-buzz.com" target="_blank">sergiolist@village-buzz.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

okay, i am really almost there.. i just need to understand how to<br>
define relationships between models ..<br>
<br>
for example..<br>
<br>
if i have the following objects:<br>
<br>
Object subclass: #Artist<br>
        instanceVariableNames: &#39;name formationYear &#39;<br>
<br>
Object subclass: #Album<br>
        instanceVariableNames: &#39; albumName releaseDate numberOfSongs duration&#39;<br>
<br>
Object subclass: #Song<br>
        instanceVariableNames: &#39; title duration&#39;<br>
<br>
in this case...<br>
<br>
an artists has many albums<br>
<br>
an album has many songs<br>
<br>
and a song has and belongs to many albums (it can be on the original<br>
release, or it can be on a best of album)..<br>
<br>
so, in this case, how would i define my instance variables to show<br>
these relationships...<br>
<br>
and how would i grab all songs that belong to a particular album?<br>
<br>
ie..<br>
<br>
how would i say:<br>
<br>
give me all fleetwood mac albums<br>
<br>
or<br>
<br>
give me all songs on the album &#39;tusk&#39;<br>
<br>
or<br>
<br>
give me all albums that &quot;don&#39;t stop&quot; shows up on<br>
<br>
thanks so much!<br>
<br>
--<br>
<br>
----<br>
peace,<br>
sergio<br>
photographer, journalist, visionary<br>
<br>
<a href="http://www.coffee-black.com" target="_blank">http://www.coffee-black.com</a><br>
<a href="http://www.painlessfrugality.com" target="_blank">http://www.painlessfrugality.com</a><br>
<a href="http://www.twitter.com/sergio_101" target="_blank">http://www.twitter.com/sergio_101</a><br>
<a href="http://www.facebook.com/sergio101" target="_blank">http://www.facebook.com/sergio101</a><br>
_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><a href="http://www.peter-osburg.de" target="_blank">www.peter-osburg.de</a><br><a href="http://www.experiencedwebprogramming.com" target="_blank">www.experiencedwebprogramming.com</a><br>
<a href="http://www.mix-rss.com" target="_blank">www.mix-rss.com</a><br>