Discussion:
unknown
1970-01-01 00:00:00 UTC
Permalink
it's not verbose, but the only way to reference a collection.
how about making extend that with more constraints like
refers_to Foo::Model::AttrCollection by 'foreign_column_for_foo',
tisql matching model => 'User' ?
I can implement this in a hour without any tisql things for prefetch,
accessor and other JDBI's method, but it will be solving a small, may
be popular, but small problem.

I don't mind against an API instead of strings, but as long it will be
sane and extendable.
and of course we can translate to whatever underlying internal tisql
representation.
1)
package TestApp::User;
...
use Jifty::DBI::Record schema {
...
column attrs =>
refers_to TestApp::AttributeCollection
by tisql => " .record = __record__.id AND .model = 'User'";
...
};
2)
package TestApp::User;
...
use Jifty::DBI::Record schema {
...
column attrs =>
refers_to TestApp::AttributeCollection
by tisql => "attrs.record = .id AND attrs.model = 'User'";
...
};
3)
package TestApp::User;
...
use Jifty::DBI::Record schema {
...
column attrs =>
refers_to TestApp::AttributeCollection
by tisql => ".attrs.record = .id AND .attrs.model =
'User'";
...
};
--
Best regards, Ruslan.
_______________________________________________
jifty-devel mailing list
http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel
_______________________________________________
jifty-devel mailing list
http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel
--
Best regards, Ruslan.
Loading...