[CDBI] new reserved words in 3.0.11?

Patrik Wallstrom pawal at blipp.com
Fri Nov 4 11:36:06 GMT 2005


Did anybody understand what I meant in this mail?

With the example objects below in version 3.0.11, I can't access
method $object->name or $object->type, only those accessors which
actually changed name in accessor_name_for.

On Thu, 03 Nov 2005, Patrik Wallstrom wrote:

> 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/20051104/f3e86086/attachment.pgp


More information about the ClassDBI mailing list