[CDBI] new reserved words in 3.0.11?

Patrik Wallstrom pawal at blipp.com
Thu Nov 3 13:59:43 GMT 2005


On Thu, 03 Nov 2005, Christopher H. Laco wrote:

> Patrik Wallstrom wrote:
> > Is the word "type" a new reserved word in the 3 series of Class::DBI?
> > 
> I hope not. I've to a field named type littered throughout Handel.
> So far, I've only tested  up to 3.0.10...

When I look at it a bit closer it seems like the new accessor_name_for
does something I am not used to. There are some more fields that does
not show up at all. At least if I don't change the accessor name for
that field other than lowercase it like this:


sub accessor_name_for
{
    my($class,$column) = @_;
    $column =~ s/^(parameter_name|person)_id$/$1/i;
    return lc $column;
}

this is the object...

$VAR1 = bless( {
                 'person_id' => undef,
                 'name' => 'example.scalar',
                 'type' => '1',
                 'from_date' => '0000-00-00 00:00:00',
                 'parameter_name_id' => '1',
                 'to_date' => undef
               }, 'SECore::DB::Parameter' );

...and this is the Columns for this object:

$VAR2 = bless( {
                 'name' => 'NAME',
                 '_groups' => {
                                'Essential' => 1
                              },
                 'mutator' => 'NAME',
                 'placeholder' => '?',
                 'accessor' => 'name'
               }, 'Class::DBI::Column' );

But ... I don't seem to have an accessor (that I can access anyway)
with the name "name" (or "type" in my previous question). I have only
got accessors for the has_a and has_many in the above
accessor_name_for. I am very confused.

-- 
patrik_wallstrom->foodfight->pawal at blipp.com->+46-733173956
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.digitalcraftsmen.net/mailman/private/classdbi/attachments/20051103/be228acd/attachment.pgp


More information about the ClassDBI mailing list