[RDBO] Loader and manager class methods

2005-11-28 Thread Sean Davis
I have a loader that loads a class My::DB::GMain associated with table g_main and seems to load My::DB::GMain::Manager. However, when I make this call: my @gmain = My::DB::GMain::Manager->get_gmains(query=>[gene_id=>672]); I get: Can't locate object method "get_gmains" via package "My::DB::GMa

Re: [RDBO] Loader and manager class methods

2005-11-28 Thread John Siracusa
On 11/28/05, Sean Davis <[EMAIL PROTECTED]> wrote: > I have a loader that loads a class > > My::DB::GMain > > associated with table g_main and seems to load My::DB::GMain::Manager. > However, when I make this call: > > my @gmain = My::DB::GMain::Manager->get_gmains(query=>[gene_id=>672]); > > I get

Re: [RDBO] Loader and manager class methods

2005-11-28 Thread John Siracusa
The next release will define a new convention manager method: --- =item B Given a table name, return a base name suitable for use as the value of the C parameter to L's make_manager_methods() method. The default implementation returns the table name as-is. --- so you can make your own convent

Re: [RDBO] Loader and manager class methods

2005-11-28 Thread Sean Davis
On 11/28/05 11:54 AM, "John Siracusa" <[EMAIL PROTECTED]> wrote: > On 11/28/05, Sean Davis <[EMAIL PROTECTED]> wrote: >> I have a loader that loads a class >> >> My::DB::GMain >> >> associated with table g_main and seems to load My::DB::GMain::Manager. >> However, when I make this call: >> >> m

Re: [RDBO] Loader and manager class methods

2005-11-28 Thread John Siracusa
On 11/28/05, Sean Davis <[EMAIL PROTECTED]> wrote: > My::DB::GMain is the class name, so I expected gmains. In practice, I > looked a the loader code and it is using the ACTUAL table name Yeah, hm, I've changed my mind a bit. How about this instead of the method I describe din my last email: --

Re: [RDBO] Loader and manager class methods

2005-11-28 Thread Sean Davis
On 11/28/05 12:16 PM, "John Siracusa" <[EMAIL PROTECTED]> wrote: > On 11/28/05, Sean Davis <[EMAIL PROTECTED]> wrote: >> My::DB::GMain is the class name, so I expected gmains. In practice, I >> looked a the loader code and it is using the ACTUAL table name > > Yeah, hm, I've changed my mind a bi

Re: [RDBO] Loader and manager class methods

2005-11-28 Thread John Siracusa
On 11/28/05, Sean Davis <[EMAIL PROTECTED]> wrote: > Is there a reason not to make the default the pluralized base name rather than > the table name, since we are talking objects of class "prefix.basename"? The trouble is that the default pluralizer is really dumb. (Partially by design. I wanted i

[RDBO] Another loader question

2005-11-28 Thread Sean Davis
John, Is there a way to pass the make_classes params via RDBO::Loader->new? Instead of doing: My $loader = RDBO::Loader->new() Then $loader->make_classes(include_tables => 'xyz') Doing something like: My $loader = RDBO::Loader->new(make_classes => {exclude_tables => 'xyz'}); $loader->make_c

Re: [RDBO] Another loader question

2005-11-28 Thread John Siracusa
On 11/28/05, Sean Davis <[EMAIL PROTECTED]> wrote: > Is there a way to pass the make_classes params via RDBO::Loader->new? > Instead of doing: > > My $loader = RDBO::Loader->new() > > Then > > $loader->make_classes(include_tables => 'xyz') > > Doing something like: > > My $loader = RDBO::Loader->ne

Re: [RDBO] Another loader question

2005-11-28 Thread Sean Davis
On 11/28/05 1:21 PM, "John Siracusa" <[EMAIL PROTECTED]> wrote: > On 11/28/05, Sean Davis <[EMAIL PROTECTED]> wrote: >> Is there a way to pass the make_classes params via RDBO::Loader->new? >> Instead of doing: >> >> My $loader = RDBO::Loader->new() >> >> Then >> >> $loader->make_classes(includ

Re: [RDBO] Another loader question

2005-11-28 Thread John Siracusa
On 11/28/05, Sean Davis <[EMAIL PROTECTED]> wrote: > Ok. To be a bit more transparent, I have been working on a > Catalyst::Model::RDBO (for my own use, anyway). I am simply modeling it on > C::M::CDBI. It works fine, except that the arguments to RDBO::Loader come > in two pieces, those for the

Re: [RDBO] Another loader question

2005-11-28 Thread Sean Davis
On 11/28/05 1:52 PM, "John Siracusa" <[EMAIL PROTECTED]> wrote: > On 11/28/05, Sean Davis <[EMAIL PROTECTED]> wrote: >> Ok. To be a bit more transparent, I have been working on a >> Catalyst::Model::RDBO (for my own use, anyway). I am simply modeling it on >> C::M::CDBI. It works fine, except t

Re: [RDBO] Another loader question

2005-11-28 Thread John Siracusa
On 11/28/05, Sean Davis <[EMAIL PROTECTED]> wrote: > I would say this is up to you. I have little desire to maintain a > Catalyst::Model::RDBO, so if producing such a thing is useful for you, go > for it. Otherwise, I can just hack things a bit to get it to work the way I > would like. I just po

Re: [RDBO] Another loader question

2005-11-28 Thread Uwe Voelker
Hello, > I just posted to the Catalyst list today mentioning that I'd like > someone to create a Catalyst::Model::RDBO. I'll do it myself > eventually. But either way, I'm willing to make this change to make > life easier for whoever ends up doing it. I'm following the Cat mailing lists since t

[RDBO] column_type_class

2005-11-28 Thread Bernhard Graf
For auto-initialization I'm trying to teach RDBO that MySQL's smallint is an integer, but w/o success. What I did so far: package My::DB::Object::Metadata; use strict; use base 'Rose::DB::Object::Metadata'; __PACKAGE__->column_type_class(smallint => 'Rose::DB::Object::Metadata::Column::Intege

Re: [RDBO] column_type_class

2005-11-28 Thread John Siracusa
On 11/28/05 5:18 PM, Bernhard Graf wrote: > For auto-initialization I'm trying to teach RDBO that MySQL's smallint > is an integer, but w/o success. > > What am I missing? You were doing it right, but there's a bug stopping it from working (an interaction of auto-init and custom column types). It

Re: [RDBO] column_type_class

2005-11-28 Thread John Siracusa
On 11/28/05 5:18 PM, Bernhard Graf wrote: > For auto-initialization I'm trying to teach RDBO that MySQL's smallint > is an integer, but w/o success. Also, I'm going to add smallint and tinyint mappings to the default column classes. -John --

Re: [RDBO] column_type_class

2005-11-28 Thread Bernhard Graf
On Tuesday 29 November 2005 02:11, John Siracusa wrote: > On 11/28/05 5:18 PM, Bernhard Graf wrote: > > For auto-initialization I'm trying to teach RDBO that MySQL's > > smallint is an integer, but w/o success. > > Also, I'm going to add smallint and tinyint mappings to the default > column classes