Sorry, I'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 => references App::Model::Foo by 'bar', is virtual;<br><br><div><span class="gmail_quote">On 8/16/07, <b class="gmail_sendername">Thomas Sibley</b> <<a href="mailto:trs@bestpractical.com">
trs@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;"><a href="mailto:jifty-commit@lists.jifty.org">jifty-commit@lists.jifty.org
</a> wrote:<br>> Author: sterling<br>> Date: Thu Aug 16 10:02:48 2007<br>> New Revision: 3908<br>><br>> Modified: Jifty-DBI/trunk/lib/Jifty/DBI/Schema.pm<br>> ==============================================================================
<br>> --- Jifty-DBI/trunk/lib/Jifty/DBI/Schema.pm (original)<br>> +++ Jifty-DBI/trunk/lib/Jifty/DBI/Schema.pm Thu Aug 16 10:02:48 2007<br>> @@ -346,6 +346,9 @@<br>> # A one-to-one or one-to-many relationship is requested
<br>> if ( UNIVERSAL::isa( $refclass, 'Jifty::DBI::Record' ) ) {<br>><br>> + # Make this a virtual record reference if they set by<br>> + $column->virtual(1) if defined $column->by and $column->by ne 'id';
<br>> +<br><br>The addition of the above line means that a column can't reference a<br>record by anything other than the id column, which is wrong and breaks<br>existing code. 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>