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

DBImport and DB name case sensitivity

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 4.1.RC2
    • 5.0-M2
    • None
    • None
    • MySQL 5.7

    Description

      I just ran into a minor issue with DB import Modeler process.

      Given: A table with lowercase table name and uppercase column names

      1. DB Import the table to Cayenne. Import preserves correct capitalization.
      2. Due to a change in project naming conventions, column name capitalization was changed to lowercase.
      3. Rerun DB import.. Result: no changes were reported, and I had to adjust the model by hand.

      So DB Import is CS for new names, but is CI when checking for changes.

      The topic of case sensitivity of DB names is not a simple one. There are lots of variations and bad legacy. Perhaps here we need to explicitly detect the case when a CI check matches a db object (a table or a column), but CS reports a pair of events - object deletion and another object creation, and present a dialog for the user to decide what to do. Possible options:

      1. replace the original names (looks like the most reasonable option)
      2. process as delete/create (the effect is almost the same as #1? except some of the obj customizations and possibly relationships may get lost ... is this a useful option?)
      3. Do nothing, effectively preserving the original capitalization (this is the current behavior. Do we care to preserve it?)

      Also need to analyze how DB import behaves when multiple tables/columns are present that only differ in capitalization (i.e. when it is not a renaming)

      In any event, this issues has a minor impact, as people usually don't randomly change name capitalization.

      Attachments

        Activity

          People

            ntimofeev Nikita Timofeev
            andrus Andrus Adamchik
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 20m
                1h 20m