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:24:27 GMT

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

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

Sure, Jeremy.

IMHO--and granted it's very, very H since I don't know the codebase--two identifiers should
be equal to each other when their delimiters are removed.  That would solve what I suspect
will be a whole class of errors.

That is, if "informix" were equal to informix.

Trimming and whitespace are a little more difficult--although my naive suspicion here is that
*identifiers* with trailing spaces don't exist.  If my suspicion is correct, then we might
be able to solve this by also saying that two identifiers are equal when their delimiters-removed,
trimmed names are equal.

That is, "informix     " should equal informix.

(I'm going to file some more bugs related to what happens when an identifier produced by the
DBDictionary makes its way into an XML schema output by XMLSchemaSerializer.  Hint: you get
things like <column name="&quot;foobar_column&quot;">, which, after reverse
mapping, ends up as: @Column(name=""foobar_column""), which doesn't compile.  Are you the
guy who will get these as well?)

> 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