Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
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.