<br><br><div><span class="gmail_quote">On 7/18/07, <b class="gmail_sendername">Jesse Vincent</b> &lt;<a href="mailto:jesse@bestpractical.com">jesse@bestpractical.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style="">
<br><div><span class="q"></span><div>Hm. (FWIW, &quot;references&quot; is the new way to spell &quot;refers_to&quot;)</div></div></div></blockquote><div><br>Good to know. I hadn&#39;t caught that. Of course, I&#39;ve been stuck in Drupal hell for the past two months. 
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style=""><div><div>What about&nbsp;</div><div><br></div><div><span style="white-space: pre;">
        </span>column foo =&gt; references Jifty::Model::Foo,</div><div><span style="white-space: pre;">                                </span>&nbsp;&nbsp;&nbsp;backreference is &#39;bar&#39;;</div><span class="q"><div><br></div><div>?</div><br></span></div></div></blockquote>
</div><br><br>Sounds fine to me. I&#39;m not too picky as long as it&#39;s possible.<br><br>Yet, I&#39;m still picky. It still seems backwards (no pun intended) to make what is, effectively, a subroutine declaration in an outside class. If &quot;references&quot; is the new &quot;refers_to&quot;, how about having this alternative:
<br><br>column bar =&gt; backreference to Jifty::Model::Bar by &#39;foo&#39;;<br><br>I think backreference has potential for stating this as well:<br><br>column bars =&gt; backreference to Jifty::Model::BarCollection by &#39;foo&#39;;
<br><br>Since that&#39;s really what a Collection reference is. And we can take it further:<br><br>column bars =&gt; backreference to Jifty::Model::BarCollection via Jifty::Model::FooBar by &#39;foo&#39;;<br><br>which could be a superb way of automatically handling simple many-to-many references with a link table.
<br>&nbsp;(I.e., &quot;simple&quot; implying that you don&#39;t have any extra columns recorded in the link table that you care about.)<br><br>With this syntax, I don&#39;t see any problem with making backreference an alias for reference either since there&#39;s no conflict, but if we do, we can deprecate the old use of reference for Collections (or not) and remove it someday. The &quot;backreference&quot; is just syntactic sugar that *implies* &quot;is virtual&quot; (but doesn&#39;t explicitly need to mean anything different from &quot;reference&quot;).
<br><br>Anyway, that&#39;s my opinion.<br>