[jifty-devel] Regarding refers_to and by on JDBI columns

Andrew Sterling Hanenkamp sterling at hanenkamp.com
Mon Jul 16 15:05:05 EDT 2007

Yes. The goal is one-to-one record-to-record references.

I'm working on some profile customization code for CAS+ using database
backed models. I was working on the relationship stuff when I discovered
that one-to-one relationships with back-references isn't supported by JDBI.
It seemed like a missing feature to me.

If JDBI doesn't support one-to-one back references, I'll just put them in as
regular subroutines on the generated CAS+ profile classes. I just wanted to
see if I should implement it in JDBI first, then virtual-models, and then
CAS+ or if it was just going into CAS+.

On 7/16/07, Jesse Vincent <jesse at bestpractical.com> wrote:
> On Jul 16, 2007, at 2:46 PM, Andrew Sterling Hanenkamp wrote:
> > To me "refers App::Model::Foo by 'bar'" seems like a good place for
> > syntactic sugar if nothing else. Treat that the same as "refers
> > App::Model::FooCollection by 'bar'" but then make the accessor
> > perform the extra "dereference" required so that the syntax for
> > accessing your record is just:
> >
> > my $linked_foo = $bar->foo;
> >
> > rather than:
> >
> > my $linked_foo = $bar->foo->first;
> Is it a case where there's a one-to-one mapping?
> Referencing a collection while saying you're referencing a record
> is.... potentially very confusing.
> _______________________________________________
> 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/20070716/b3410d3a/attachment-0001.htm

More information about the jifty-devel mailing list