[Dbix-class] column accessor namespace
Dave Howorth
dhoworth at mrc-lmb.cam.ac.uk
Tue Jul 4 18:21:07 CEST 2006
Matt S Trout wrote:
> You might like to have a play with Schema::Loader's dump_to_dir method, which
> would allow you to generate the DBIC definitions for stuff, and then tweak
> appropriately (changing __PACKAGE__->belongs_to into an explicit
> add_relationship call should get rid of that clash)
I managed to get it to produce some definition classes by 'exclude'ing
one class at a time. First the class that has the belongs_to and then
the class that it refers to. Excluding either was enough to get it to
generate (an approximation to) a class for the other.
> DBIC tends to overwrite methods rather than barfing like CDBI does since often
> you *can* overwrite a substantial number of provided methods without it
> failing. You could even, provided your "belongs_to" column doesn't need to be
> a belongs_to rel itself, simply add_columns it as the last thing in the file :)
Yeah, it did that OK as above. Sadly, in real life it will need to be a
relationship, but that's a problem for another day. Today, I don't need
to access those tables :)
Once again, thanks to all involved for a great set of modules.
Cheers, Dave
More information about the Dbix-class
mailing list