openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Laird Nelson (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENJPA-1537) SchemaGenerator interacts poorly with InformixDictionary (regression from 1.2.2)
Date Thu, 25 Feb 2010 17:06:27 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-1537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12838418#action_12838418
] 

Laird Nelson commented on OPENJPA-1537:
---------------------------------------

One workaround for the SchemaGenerator case is to subclass the Informix dictionary and make
it pretend that it doesn't support delimited identifiers (dict.supportsDelimitedIdentifiers
= false).  But that seems like solving the problem with a howitzer.

Additionally, you need to supply a DBIdentifierUtil whose fromDBName() method first trim()s
the incoming name, since even if the dictionary doesn't support delimited identifiers, it
will quote the name anyhow if it has space padding in it.

trimSchemaNames appears to have no effect--i.e. it isn't consulted before the name is passed
to fromDBName(), so that's not an avenue for working around the problem.

> SchemaGenerator interacts poorly with InformixDictionary (regression from 1.2.2)
> --------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1537
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1537
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc, sql
>    Affects Versions: 2.0.0-beta
>            Reporter: Laird Nelson
>            Assignee: Jeremy Bauer
>
> If you ask the SchemaGenerator to generate schemas like this:
> sg.generateSchemas(new DBIdentifier[] { DBIdentifier.newTable("informix.foobar_table")
});
> ...then identifiers within the SchemaGenerator--whether of tables, primary keys, foreign
keys, what have you--contain quotes.
> Quoted identifiers are then subsequently not trimmed, because the space padding occurs
inside the quotes.
> This means the SchemaGroup will, for example, never find the Schema identified by the
user at generateSchemas()-call-time.  Consequently no foreign keys will be generated.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message