Sorry, I&#39;d never even considered linking to a record by something other than the ID column. My fault.<br><br>Would the patch work if everything were the same except for the making the column virtual automatically? I.e., if a model had:
<br><br>column foo =&gt; references App::Model::Foo by &#39;bar&#39;, is virtual;<br><br><div><span class="gmail_quote">On 8/16/07, <b class="gmail_sendername">Thomas Sibley</b> &lt;<a href="mailto:trs@bestpractical.com">
trs@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;"><a href="mailto:jifty-commit@lists.jifty.org">jifty-commit@lists.jifty.org
</a> wrote:<br>&gt; Author: sterling<br>&gt; Date: Thu Aug 16 10:02:48 2007<br>&gt; New Revision: 3908<br>&gt;<br>&gt; Modified: Jifty-DBI/trunk/lib/Jifty/DBI/Schema.pm<br>&gt; ==============================================================================
<br>&gt; --- Jifty-DBI/trunk/lib/Jifty/DBI/Schema.pm&nbsp;&nbsp; (original)<br>&gt; +++ Jifty-DBI/trunk/lib/Jifty/DBI/Schema.pm&nbsp;&nbsp; Thu Aug 16 10:02:48 2007<br>&gt; @@ -346,6 +346,9 @@<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# A one-to-one or one-to-many relationship is requested
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if ( UNIVERSAL::isa( $refclass, &#39;Jifty::DBI::Record&#39; ) ) {<br>&gt;<br>&gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Make this a virtual record reference if they set by<br>&gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$column-&gt;virtual(1) if defined $column-&gt;by and $column-&gt;by ne &#39;id&#39;;
<br>&gt; +<br><br>The addition of the above line means that a column can&#39;t reference a<br>record by anything other than the id column, which is wrong and breaks<br>existing code.&nbsp;&nbsp;Can you back it out (or fix it to be right)?
<br><br>Tom<br>_______________________________________________<br>jifty-devel mailing list<br><a href="mailto:jifty-devel@lists.jifty.org">jifty-devel@lists.jifty.org</a><br><a href="http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel">
http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel</a><br></blockquote></div><br>