[jifty-devel] column in Model references ModelCollection
Peter Mottram
peter at sysnix.com
Tue Mar 18 14:25:19 EDT 2008
Hi All
I guess I'm being too stupid here but what I'm trying to achieve in my
model is:
package MyApp::Model::Foo;
use Jifty::DBI::Schema;
use MyApp::Record schema {
column one =>
type is 'text';
column two =>
references MyApp::Model::BarCollection by 'required_by',
default is undef;
};
package MyApp::Model::Bar;
use Jifty::DBI::Schema;
use MyApp::Record schema {
column required_by =>
references MyApp::Model::Foo;
column requires =>
references MyApp::Model::Foo;
};
Weirdly jifty schema --setup doesn't bother creating column two in foos
and throws no errors or warnings to give me a clue.
What I really need is to have one record in Foo to be able to reference a
collection of Foo records but whatever method I try gets nowhere fast.
Can anyone give me a clue as to what to try next? I have played with
referencing collections in a much simpler form and just can't get the damn
things to cooperate in any way. I'm even getting close to implementing
this using just Mason and DBI (faithful old friends). :-(
TIA
PeteM
More information about the jifty-devel
mailing list