Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-2911

Make DBRE naming package/class/field naming strategies pluggable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.2.0.M1
    • Fix Version/s: None
    • Component/s: PERSISTENCE
    • Labels:
      None

      Description

      Is it possible to override the naming strategy that Roo dbre uses when creating Roo_DbManaged ITDs?

      For example, we have a database which uses 2 char prefixes on column names to indicate the datatype, e.g. TX_EMPLOYEE_NAME, which by default maps to txEmployeeName - I would like it to map to employeeName.

      Also, ID_EMPLOYEE maps to idEmployee, whereas I would rather it was employeeId.

      Same thing goes for the package names DBRE generates which are just lowercase version of the schema names.
      Our schema names have a 2 char prefix, which denotes the app name, so our schema names are like XX_AUDIT, XX_CONFIG, XX_RUNTIME etc.. where XX is a 2 char code for our app.

      Ideally what I would like is something along the lines of the Hibernate DelegatingReverseEngineeringStrategy:
      http://docs.jboss.org/tools/2.1.0.Beta1/hibernatetools/html/reverseengineering.html#custom-reveng-strategy

      In the short term, I have achieved this by getting the Roo source and hacking the DbreTypeUtils class to meet our requirements.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ammwhite Andrew White
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: