Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-1772

Real support for DbEntity catalogs

Agile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.2.M1
    • Core Library, Modeler
    • None

    Description

      While DbEntity has a 'catalog' property, we sort of ignore its presence, don't include catalogs in generated SQL, and advise users to enter it in the "schema" field. However there is a practical aspect of catalogs vs. schemas that became obvious when I started using 'cdbimport' with MySQL (see CAY-1759). MySQL only has a single notion of "database" as a table namespace unit within a given server instance. This maps to "catalog" in the MySQL JDBC driver (see [1], and [2] for explanation of schemas vs catalogs across DBs).

      While using schema in place of catalog was fine with manual mapping, it became a problem with reverse-engineered DataMaps that left the schema empty. So all the generated SQL based on such DataMaps would use bare table names, and if the catalog is not a part of JDBC URL, a namespace conflict would occur.

      So we need to :

      1. honor catalog setting in generated SQL
      2. add "default catalog" DataMap, and "catalog" to DbEntity fields in the Modeler

      [1] http://forums.mysql.com/read.php?39,137564,137629#msg-137629
      [2] http://stackoverflow.com/questions/7942520/relationship-between-catalog-schema-user-and-database-instance

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            andrus Andrus Adamchik
            andrus Andrus Adamchik
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment