cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tore Halset (JIRA)" <>
Subject [jira] [Commented] (CAY-2024) check for AUTO_PK_TABLE should respect current schema
Date Thu, 17 Sep 2015 13:04:05 GMT


Tore Halset commented on CAY-2024:

Here is a pull-request that uses the same schema to look for AUTO_PK_SUPPORT in the same schema
as insert/update is done. 

My first attemt was to use Connection#getSchema from java 7 and then use that in md.getTables,
but that would require all jdbc drivers / pools to be updated as well.

> check for AUTO_PK_TABLE should respect current schema
> -----------------------------------------------------
>                 Key: CAY-2024
>                 URL:
>             Project: Cayenne
>          Issue Type: Bug
>            Reporter: Tore Halset
>            Assignee: Tore Halset
>            Priority: Minor
>             Fix For: Undefined future
> The create/delete/insert/update of AUTO_PK_TABLE should respect the schema in the model.
There are other older issues covering this.
> When a schema is not defined in the model, the create/delete/insert/update of AUTO_PK_TABLE
in the default schema works fine. However, the check for AUTO_PK_TABLE in JdbcPkGenerator#autoPkTableExists
are currently looking in all schemas. But it should only check in the current schema.
> I discovered this when trying to run several instances of one cayenne application on
different schemas in the same database.
> In java 7, they added java.sql.Connection#getSchema that should return the current schema.
However, cayenne 4 seem to be at java 6. To make getSchema work also jdbc drivers and connection
pools must be updated. Do we need to create our own getSchema(Connection), or do we already
have it, or are cayenne 4 going to be java 7+?

This message was sent by Atlassian JIRA

View raw message