[ https://issues.apache.org/jira/browse/CAY-2024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14802762#comment-14802762 ]
ASF GitHub Bot commented on CAY-2024: ------------------------------------- GitHub user halset opened a pull request: https://github.com/apache/cayenne/pull/74 CAY-2024 Check for AUTO_PK_TABLE should respect current schema You can merge this pull request into a Git repository by running: $ git pull https://github.com/halset/cayenne CAY-2024 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cayenne/pull/74.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #74 ---- commit 77a774f34034216263a8fedad75ea9c25da24938 Author: halset <hal...@ecc.no> Date: 2015-09-17T11:22:11Z CAY-2024 Check for AUTO_PK_TABLE should respect current schema ---- > check for AUTO_PK_TABLE should respect current schema > ----------------------------------------------------- > > Key: CAY-2024 > URL: https://issues.apache.org/jira/browse/CAY-2024 > 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 (v6.3.4#6332)