Matt S Trout wrote:
> On Wed, May 13, 2009 at 04:16:33PM +0100, Chris Cole wrote:
>> Chris Cole wrote:
>>> David Ihnen wrote:
>>> Apologies. I used the DBIx::Class::Schema::Loader module to load the
>>> schema so I didn't have it explicitly. However, I got it to dump the
>>> schema to file.
>>>
>>>> But I'm going to suspect that MirbaseHairpinMatch.pm MUST have a line
>>>> something like this in it
>>>>
>>>> __PACKAGE__->belongs_to('seq_data', 'Whatever::seq_data', { 'foreign.id'
>>>> => 'self.query_id' });
>>> Close. It's:
>>> __PACKAGE__->belongs_to("query_id", "My::Schema::SeqData", { id =>
>>> "query_id" });
>>>
>> I forgot to ask. When using the DBIx::Class::Schema::Loader how does one
>> find out the relationship names in the schema? Must the schema always be
>> dumped to file or is there a method for reporting the relationship names?
> 
> You should always dump it to disk - it can happily regenerate a dumped schema
> that you've added code to anyway.
> 
> Look at the DBIx::Class::Schema::Loader::Base docs for ways to control the
> relation names - you probably want 'query' rather than 'query_id' for e.g.
> 

OK. Ta.


_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk

Reply via email to