[Dbix-class] ENUM values from MySQL using the column_info()
Zbigniew Lukasiak
zzbbyy at gmail.com
Fri May 12 12:35:49 CEST 2006
On 5/12/06, Carl Franks <fireartist at gmail.com> wrote:
> As far as I know, DBIx::Class doesn't make any effort to try to be
> case-insensitive, but if your database is, then DBIx::Class may appear
> to be case-insensitive.
I don't know how much conscious effor there is but if I have a table
with two columns with names differing only by case:
test=# select * from casecheck;
id | name | NAME
----+------+------
1 | aaa | AAA
(1 row)
(this is Pg)
and I define DBIC class columns with the same case:
__PACKAGE__->add_columns(qw/id name NAME/);
Then when I retrieve the record and print the values in it's columns:
my $record = $schema->resultset( 'Casecheck' ) -> find ( 1 );
print "record->name: ", $record->name, "\n";
print "record->NAME: ", $record->NAME, "\n";
I get:
record->name: aaa
record->NAME: aaa
While I would expect the last line to be: record->NAME: AAA
Summing up - the database is casesensitive, but in DBIC is not (in this case:).
--
Zbigniew Lukasiak
http://brudnopis.blogspot.com/
More information about the Dbix-class
mailing list