FAQ
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);
}

Search Discussions

  • Michael Gentry at Dec 15, 2011 at 1:57 pm
    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);
    }
  • Kevin Meyer - KMZ at Dec 15, 2011 at 2:38 pm
    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);
    }
  • Michael Gentry at Dec 15, 2011 at 3:42 pm
    Thanks Kevin!
    On Thu, 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);
    }
  • Andrus Adamchik at Dec 20, 2011 at 3:24 am
    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);
    }

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categoriescayenne
postedDec 14, '11 at 5:31a
activeDec 20, '11 at 3:24a
posts5
users3
websitecayenne.apache.org

People

Translate

site design / logo © 2021 Grokbase