openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Sutter (JIRA)" <>
Subject [jira] Commented: (OPENJPA-399) openjpa did not handle multiple schema names with same table name
Date Thu, 11 Oct 2007 14:42:51 GMT


Kevin Sutter commented on OPENJPA-399:

I haven't reviewed your patch yet, but I'd like to get some clarification on the problem first...

>  Although the datasource uses different schema name, openjpa only created one table for
DOG but not DOG2.

It seems that your code example is dependent on another configuration somewhere.  Either a
persistence.xml or orm.xml that would differentiate the schema name.  Is that correct?  Your
text mentions a "datasource uisng a different schema name", but I'm not sure what you meant
by that.  Basically, you are saying that attempting to use the same table with different schemas
causes a problem because we are currently not differentiating between tables with different
schemas.  Right?

>  2) If multiple entities have the generatedType.AUTO, SEQUENCE, TABLE for ID and using
the same table name, then each entity must have the schema name.

Not sure I follow this.  Are you stating the use of different schemas is an absolute requirement
for id generation?  Or, only if you are interested in keeping the id generations separate
from each other?  I'm trying to figure out what limitations exist under what conditions.

And, your last example with multiple sequence generators...  Did you have to change something
to allow this to work?  This sounds like normal, expected behavior.  Did you fix something
in this area?

Finally, as part of the patch, it sounds like you are suggesting some documentation updates.
 Are you going to include the necessary documentation updates to clarify these restrictions?
 Since it sounds like we are totally broke with some of these scenarios, I'm okay with fixing
the problem(s) with documentation updates.  But, I don't want to fix something without documenting
how it's supposed to work for our customers.  Or, how we can make it work for our customers.

I'll take a look at your patch next, but I wanted to get started with these questions.


> openjpa did not handle multiple schema names with same table name
> -----------------------------------------------------------------
>                 Key: OPENJPA-399
>                 URL:
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 1.0.1
>         Environment: JDK1.5, OPENJPA verison 580425
>            Reporter: Teresa Kan
>         Attachments: OPENJPA_399.patch
> Two entities have the same table name but with different schema, only one table is created.
In addition, when two entities use the generatedType.AUTO for ID, only one OPENJPA_SEQUENCE-TABLE
is created.
> The problem due to the SchemaGroup.findTable() which only looked for a table name from
all the schemas. Once the table was found in one of the schema then it exited and assumed
that the table existed. Same problem in the TableJDBCSeq.addSchema().

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

View raw message