cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: Table case in CreateIfNoSchemaStrategy causes problems [3.1M4-SNAPSHOT]
Date Tue, 20 Dec 2011 03:24:04 GMT
Maybe try DataMap.setQuotingSQLIdentifiers(true) - this should ensure case sensitive operation
of the strategy IIRC.

Cheers,
Andrus

On Dec 15, 2011, at 9:37 AM, Kevin Meyer - KMZ wrote:

> By default HSQLDB converts all table names and field names to upper 
> case, and is case sensitive on SELECTS.
> 
> I've created JIRA CAY-1645. I'm not sure about which component or 
> type, so I chose Task and left the component blank.
> 
> Regards,
> Kevin
> 
> 
> On 15 Dec 2011 at 8:56, Michael Gentry wrote:
> 
>> Hi Kevin,
>> 
>> I'm not familiar offhand with the case sensitivity of HSQLDB, but a
>> JIRA would be nice so we can remember to explore it later.
>> 
>> Thanks,
>> 
>> mrg
>> 
>> 
>> On Wed, Dec 14, 2011 at 12:31 AM, Kevin Meyer - KMZ wrote:
>>> In CreateIfNoSchemaStrategy, I have run into problems with HSQLDB
>>> and upper/mixed case table names.
>>> 
>>> In particular, if I lower or mixed case my DBEntity name, the resulting
>>> tables are not found by CreateIfNoSchemaStrategy whenI use
>>> HSQLDB.
>>> 
>>> I found that if I convert all table name checks to upper case, then
>>> CreateIfNoSchemaStrategy finds the existing table and does not try to
>>> regenerate it.
>>> 
>>> Is this a general solution? Will it break anything else? Should I raise a
>>> JIRA ticket?
>>> 
>>> Regards,
>>> Kevin
>>> 
>>>        while (it.hasNext()) {
>>>            if (nameTables.get(it.next().getName().toUpperCase()) != null) {
>>>                generate = false;
>>>                break;
>>>            }
>>>        }
>>> 
>>> 
>>> and
>>> 
>>>                while (rs.next()) {
>>>                    String name = rs.getString("TABLE_NAME");
>>>                    nameTables.put(name.toUpperCase(), false);
>>>                }
>>> 
> 
> 


Mime
View raw message