Spring Roo
  1. Spring Roo
  2. ROO-1410

DBRE to include/exclude specified tables

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Complete
    • Affects Version/s: 1.1.0.RC1
    • Fix Version/s: 1.1.1.RELEASE
    • Component/s: PERSISTENCE
    • Labels:
      None

      Description

      would be totally helpful to have something like:

      // include all tables except specified
      database reverse engineer --exclude-tables BAD_TABLE0,BAD_TABLE1 
      

      and/or

      // include only requested tables
      database reverse engineer --include-tables GOOD_TABLE2,GOOD_TABLE3
      

      At the moment DBRE takes all tables. You can strip ones you do not need directly changing dbre.xml, but it is not right, since every next call to 'database reverse engineer' overwrites dbre.xml.

        Activity

        Hide
        Alan Stewart added a comment -

        Can't do this as each table is processed as it found in the metadata and relationships are created to other tables which are required to be present. Compile errors will result if I exclude tables. I already experimented with this.

        Show
        Alan Stewart added a comment - Can't do this as each table is processed as it found in the metadata and relationships are created to other tables which are required to be present. Compile errors will result if I exclude tables. I already experimented with this.
        Hide
        Roman Kuzmik added a comment -

        it can be left at the user discretion. we have schema with tons of tables, while only couple of them need to be involved into project. So, it would be nice for the user to be able to pick up set of tables manually. anyway it is gonna be optional parameter, so should be no harm.

        Show
        Roman Kuzmik added a comment - it can be left at the user discretion. we have schema with tons of tables, while only couple of them need to be involved into project. So, it would be nice for the user to be able to pick up set of tables manually. anyway it is gonna be optional parameter, so should be no harm.
        Hide
        Alan Stewart added a comment - - edited

        Deferred to Roo 1.2, as the Roo command line does not support arrays of values for options at the moment

        Show
        Alan Stewart added a comment - - edited Deferred to Roo 1.2, as the Roo command line does not support arrays of values for options at the moment
        Hide
        Alan Stewart added a comment -

        --excludeTables option added to database reverse engineer command in Git ID 7ea831201b44d2ede83307feb06682aede6e866c. The way to specify tables to exclude follows the normal Roo format ie for a single table:
        database reverse engineer --excludeTables PET or database reverse engineer --excludeTables "PET"

        For multiple tables, the table names must be enclosed by pairs of double quotes and be separated by spaces, eg
        database reverse engineer --excludeTables "PET VET"

        Subsequents executions of the database reverse engineer do not need to specify --excludeOptions to exclude the same tables, similar to the --schema and --package options. To un-exclude tables specify an empty string, eg
        database reverse engineer --excludeTables

        Show
        Alan Stewart added a comment - --excludeTables option added to database reverse engineer command in Git ID 7ea831201b44d2ede83307feb06682aede6e866c. The way to specify tables to exclude follows the normal Roo format ie for a single table: database reverse engineer --excludeTables PET or database reverse engineer --excludeTables "PET" For multiple tables, the table names must be enclosed by pairs of double quotes and be separated by spaces, eg database reverse engineer --excludeTables "PET VET" Subsequents executions of the database reverse engineer do not need to specify --excludeOptions to exclude the same tables, similar to the --schema and --package options. To un-exclude tables specify an empty string, eg database reverse engineer --excludeTables
        Hide
        Dzmitry Barouka added a comment -

        It would be great to use this:
        --excludeTables "SOME_PREFIX* SOME_POSTFIX *SOME_PART_OF_TABLE_NAME_"

        • - means any characters.
        Show
        Dzmitry Barouka added a comment - It would be great to use this: --excludeTables "SOME_PREFIX* SOME_POSTFIX *SOME_PART_OF_TABLE_NAME_ " - means any characters.
        Hide
        Dzmitry Barouka added a comment -

        Sorry, forgot to escape:

        --excludeTables "SOME_PREFIX* *SOME_POSTFIX *SOME_PART_OF_TABLE_NAME*"

        Show
        Dzmitry Barouka added a comment - Sorry, forgot to escape: --excludeTables "SOME_PREFIX* *SOME_POSTFIX *SOME_PART_OF_TABLE_NAME*"
        Hide
        Alan Stewart added a comment -

        Added wildcard searching in Git ID b8f4040d7c1958102019a786abc30aadf1c8bf1b. One can specify * to match many characters or ? to match a singe character. Example:

        database reverse engineer --excludeTables "foo* ?bar* com*bar"

        Show
        Alan Stewart added a comment - Added wildcard searching in Git ID b8f4040d7c1958102019a786abc30aadf1c8bf1b. One can specify * to match many characters or ? to match a singe character. Example: database reverse engineer --excludeTables "foo* ?bar* com*bar"

          People

          • Assignee:
            Alan Stewart
            Reporter:
            Roman Kuzmik
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: