Skip Menu |

This queue is for tickets about the DBIx-Class CPAN distribution.

Report information
The Basics
Id: 60112
Status: rejected
Priority: 0/
Queue: DBIx-Class

Owner: Nobody in particular
Requestors: TEDDY [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Download (untitled) / with headers
text/plain 1.3k
DBIx::Class::Schema::Loader generates column names made of lowercase only for Oracle databases. This is OK if the database doesn't contain column names (or table names) which are reserved words. If a column has a reserved word name like date or timestamp, it should be enclosed in double quotes in order to be able to use it, like "date" or "timestamp". If all the columns are lowercased, the program will try to use the columns as they are, without knowing which of them should be enclosed between quotes and the program will give an error telling that a column name is not valid. If we add the quote_char option with the char '"' as the quoting char, all the columns will be quoted. If they will contain lowercase letters, the special word columns like "date" or "timestamp" will be OK, but the other columns won't be OK. If the column names will contain only uppercase letters, the reserved words columns won't be OK because "date" and "DATE" is not the same thing. COLUMN == column == "COLUMN" but != "column" There may be more solutions (if there isn't another solution already available that I don't know about): Use the columns in the Result classes as: "column_name" "\"specialword\"" or specify the real name of the column in the "original" hashref. or specify with a new key that the current column should be lowercased or uppercased.
From: bitcard [...]
Download (untitled) / with headers
text/plain 238b
Hi, Thanks for the report. Just to get things straight, am I right in my understanding that your oracle schema is similar to the following: table1: ID COL1 COL2 ... "COL_WITH_RESERVED_NAME" e.g.: table1: id col1 col2 "COMMENT" col4 ?
From: bitcard [...]
better still, please give sql code of your table creation in oracle
From: bitcard [...]
Download (untitled) / with headers
text/plain 184b
Le Dim 08 Aoû 2010 08:17:40, faxm0dem a écrit : Show quoted text
> better still, please give sql code of your table creation in oracle
BTW, did you try using "preserve_case => 1" in loader_options?
Download (untitled) / with headers
text/plain 172b
Closing ticket as it seems that the Schema::Loader option 'preserve_case' exists specifically to solve this problem. Feel free to reopen if this is not the entire solution.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to