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