Re: [siesta-dev] prefixing tablenames?

[prev] [thread] [next] [lurker] [Date index for 2004/11/01]

From: Bowen Dwelle
Subject: Re: [siesta-dev] prefixing tablenames?
Date: 16:56 on 01 Nov 2004
Thanks Richard. This works:

# in Siesta::DBI.pm
sub set_up_table {
         my ($class, $table_name)  = @_;
         $class->SUPER::set_up_table(
		Siesta::Config::config->table_prefix . $table_name);
}

Richard Clamp wrote:
> On 31 Oct 2004, at 21:15, Bowen Dwelle wrote:
> 
>> Trying to get this to work the right way as Richard suggests, I 
>> created Siesta::DBI
>>
>> sub set_up_table {
>>   my ($class, $table_name)  = @_;
>>   __PACKAGE__->SUPER::set_up_table( $Siesta::Config::TABLE_PREFIX . 
>> $table_name);
>> }
>>
> 
> $class->SUPER::set_up_table(...) is closer to what is needed.
> 
>> when I run nacho with this in place, I get
>>
>> bdwelle:~> nacho show-members info-list
>> Siesta::List can't SELECT id
>> FROM   siesta_deferred
>> WHERE  name = ?
>> : DBD::mysql::st execute failed: Unknown column 'name' in 'where 
>> clause' [for Statement "SELECT id
>> FROM   siesta_deferred
>> WHERE  name = ?
>> "] at /home/bdwelle/lib/DBIx/ContextualFetch.pm line 51.
>>  at /home/bdwelle/bin/nacho line 357
>> bdwelle:~>
>>
>> some sort of inheritance problem... ?   Note that set_up_table is 
>> specific to Class::DBI::mysql -- it doesn't exist in Class::DBI itself
> 
> 
> Note that you always end up using a Class::DBI::$foo because of 
> Class::DBI::BaseDSN.
> 
There's stuff above here

Generated at 14:00 on 11 Nov 2004 by mariachi 0.52