[Dbix-class] DBIx::Class::Schema::Loader limitations
Brandon Black
blblack at gmail.com
Thu Jun 29 23:37:01 CEST 2006
On 6/29/06, Daniel McBrearty <danielmcbrearty at gmail.com> wrote:
> and seeing the docs for Loader::Base ... it looks like {relationships
> => 1} gives 1-1 and 1-many but not many-many relationships. so maybe
> that's the better reason for manual definition ... ?
>
That too :) It does find the two rels (1-m and m-1) involved in the
many-many, it just doesn't hook them together into the third many-many
rel.
Having it do this automatically is on the TODO list, along with
implicit rels ( Stuff like: bar belongs_to foo (via the pk), baz
belongs_to foo (via the pk), therefore bar might_have baz and baz
might_have bar ). In both cases, the issue is that the heuristics for
finding them might find lots and lots of inferred relationships you
didn't expect or desire really. I don't think it will be so bad as
long as we keep things down to just two hops though.
Before the Schema::Loader's RelBuilder gains these new abilities
though, I'd first like to get it fully unhooked from the rest of
Schema::Loader so it can be used on normal schemas (and even by sqlt?)
too.
-- Brandon
More information about the Dbix-class
mailing list