You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Andrus Adamchik (JIRA)" <ji...@apache.org> on 2013/05/23 13:56:20 UTC

[jira] [Updated] (CAY-1824) Support catalog/schema for PK artifacts

     [ https://issues.apache.org/jira/browse/CAY-1824?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrus Adamchik updated CAY-1824:
---------------------------------

    Description: 
AUTO_PK_SUPPORT and other PK-generator related artifacts are referenced by Cayenne as bare identifiers not prefixed by catalog or schema. It works most of the time (and IIRC no one has complained to date), so I'll be the first. 

I have MySQL with multiple databases ("catalogs" in JDBC speak), multiple apps (each accessing 1-2 DBs) and a single DataSource used by all these apps. In this setup we should have AUTO_PK_SUPPORT in each catalog, and PkGenerator must prefix it with catalog name to pick the right one on each insert.

So there are 2 ways we can go about it:
1. Use DataMap default catalog and schema as a namespace for any of the PK-generation related artifacts. 
2. Use each specific table catalog and schema as a namespace for the PK-generation artifacts related to this entity.

  was:
AUTO_PK_SUPPORT and other PK-generator related artifacts are referenced by Cayenne as bare identifiers not prefixed by catalog or schema. It works most of the time (and IIRC no one has complained to date), so I'll be the first. 

I have MySQL with multiple databases ("catalogs" in JDBC speak), multiple apps (each accessing 1-2 DBs) and a single DataSource used by all these apps. In this setup we should have AUTO_PK_SUPPORT in each catalog, and PkGenerator must prefix it with catalog name to pick the right one on each insert.

So I think we should use DataMap level catalog and schema as a namespace for any of the PK-generation related artifacts. 

    
> Support catalog/schema for PK artifacts
> ---------------------------------------
>
>                 Key: CAY-1824
>                 URL: https://issues.apache.org/jira/browse/CAY-1824
>             Project: Cayenne
>          Issue Type: Improvement
>            Reporter: Andrus Adamchik
>            Assignee: Andrus Adamchik
>
> AUTO_PK_SUPPORT and other PK-generator related artifacts are referenced by Cayenne as bare identifiers not prefixed by catalog or schema. It works most of the time (and IIRC no one has complained to date), so I'll be the first. 
> I have MySQL with multiple databases ("catalogs" in JDBC speak), multiple apps (each accessing 1-2 DBs) and a single DataSource used by all these apps. In this setup we should have AUTO_PK_SUPPORT in each catalog, and PkGenerator must prefix it with catalog name to pick the right one on each insert.
> So there are 2 ways we can go about it:
> 1. Use DataMap default catalog and schema as a namespace for any of the PK-generation related artifacts. 
> 2. Use each specific table catalog and schema as a namespace for the PK-generation artifacts related to this entity.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira