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

_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/

Reply via email to