[jifty-devel] Re: [Jifty-commit] r3908 - in Jifty-DBI/trunk: . lib/Jifty/DBI

Andrew Sterling Hanenkamp sterling at hanenkamp.com
Thu Aug 16 16:27:21 EDT 2007


Sorry, I'd never even considered linking to a record by something other than
the ID column. My fault.

Would the patch work if everything were the same except for the making the
column virtual automatically? I.e., if a model had:

column foo => references App::Model::Foo by 'bar', is virtual;

On 8/16/07, Thomas Sibley <trs at bestpractical.com> wrote:
>
> jifty-commit at lists.jifty.org wrote:
> > Author: sterling
> > Date: Thu Aug 16 10:02:48 2007
> > New Revision: 3908
> >
> > Modified: Jifty-DBI/trunk/lib/Jifty/DBI/Schema.pm
> >
> ==============================================================================
> > --- Jifty-DBI/trunk/lib/Jifty/DBI/Schema.pm   (original)
> > +++ Jifty-DBI/trunk/lib/Jifty/DBI/Schema.pm   Thu Aug 16 10:02:48 2007
> > @@ -346,6 +346,9 @@
> >          # A one-to-one or one-to-many relationship is requested
> >          if ( UNIVERSAL::isa( $refclass, 'Jifty::DBI::Record' ) ) {
> >
> > +            # Make this a virtual record reference if they set by
> > +            $column->virtual(1) if defined $column->by and $column->by
> ne 'id';
> > +
>
> The addition of the above line means that a column can't reference a
> record by anything other than the id column, which is wrong and breaks
> existing code.  Can you back it out (or fix it to be right)?
>
> Tom
> _______________________________________________
> jifty-devel mailing list
> jifty-devel at lists.jifty.org
> http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.bestpractical.com/pipermail/jifty-devel/attachments/20070816/217c4297/attachment.htm


More information about the jifty-devel mailing list