On 7/14/06 9:19 PM, Danial Pearce wrote:
> Cool thanks. That's close to what I had. I just wasn't sure if it was
> safe to be overloading the Metadata methods like that.
It's safe to override any public method, especially when making a simple
change like this and delegating the rest to the supercl
> sub auto_generate_column
> {
> my $column = shift->SUPER::auto_generate_column(@_);
> $column->add_auto_method_types('get', 'set');
> $column->method_name(get => 'get' . $column->name);
> $column->method_name(set => 'set' . $column->name);
> return $column;
>
On 7/14/06 7:56 PM, Danial Pearce wrote:
> I have tried a few different things, all of which I can get to work.
>
> __PACKAGE__->auto_init_columns;
> for (__PACKAGE__->meta->columns) {
> __PACKAGE__->meta->column($_)->auto_method_types('get', 'set');
> __PACKAGE__->meta->column($_)->meth
G'day,
I have used a convention manager to deal with the fact that I don't
use plurals.
create table Foo (
ID serial not null,
Bar text not null,
primary key ('ID')
);
package My::ConventionManager;
use base qw(Rose::DB::Object::ConventionManager);
sub auto_table_name { ucfirst
2006/4/25, John Siracusa <[EMAIL PROTECTED]>:
[...]
> http://search.cpan.org/dist/Rose-DB-Object/lib/Rose/DB/Object/ConventionMana
> ger.pm#SUMMARY_OF_DEFAULT_CONVENTIONS
>
> You've also discovered that the default CM is not too smart about converting
> (what it thinks are) plural words to singular
On 4/25/06, Clayton Scott <[EMAIL PROTECTED]> wrote:
> What kind of problems can I expect to run into if I reimplement the
> plural_to_singular and the other related methods to do the equivalent of:
>
> sub plural_to_singular
> {
> my($self, $word) = @_;
> return $word;
> }
>
> I ask because I'
lass will have it's last
> > 's' dropped
> > to become "Addres".
> >
> > I expected that using RDBO::ConventionManager::Null would prevent that
> > from occuring.
>
> The convention manager is asked to "fill in the blank" when there i
On 4/24/06 5:52 PM, Clayton Scott wrote:
> My schema has a table "address". When using the default ConventionManager
> and autogenerating classes the coresponding class will have it's last
> 's' dropped
> to become "Addres".
>
> I expected t
have it's last
's' dropped
to become "Addres".
I expected that using RDBO::ConventionManager::Null would prevent that
from occuring.
Is that an incorrect interpretation of the docs? Have I set up my base
class correctly?
Base Class:
package LF::Base;
use base 'Ro