Results 1 to 9 of 9

Thread: How to ignore a table in DBRE

  1. #1

    Default How to ignore a table in DBRE

    This is probably obvious, but I seem to be missing it.

    I've reverse engineered a table, but one table is causing me problems. It's not a table I need, so is there a way to tell Roo to ignore it. I tried deleting the java and aj classes, but Roo regenerated them (I'm assuming from the DBRE file).

    Is there a way to tell Roo to ignore certain tables?

    Thanks!

  2. #2
    Join Date
    Dec 2005
    Posts
    930

    Default

    --excludeTables is what you need. However, if that table has a FK relationship to another, then you may run into problems
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

  3. #3

    Default

    Thanks, that looks like what I needed. It's not working though. Here's the command I'm using:

    Code:
    database reverse engineer --schema EO_NPN --package ~.db --excludeTables "EO_NPN.MANAGE_STUDENTS EO_NPN.PERSON EO_NPN.SESSIONS EO_NPN.SESSION_BACKUP317 EO_NPN.STATION_SPECIES EO_NPN.USERS"
    I also tried

    Code:
    database reverse engineer --schema EO_NPN --package ~.db --excludeTables "MANAGE_STUDENTS PERSON SESSIONS SESSION_BACKUP317 STATION_SPECIES USERS"
    In both cases, the classes are not ignored. Am I still missing something?

    Thanks!

  4. #4
    Join Date
    Dec 2005
    Posts
    930

    Default

    I know that it works (still !) since I was playing with the option yesterday. Have you specified the tables exactly as they appear in the .roo-dbre XML file? What DB do you use? If Oracle, Postgres, or MYSQL, attach a DDL and I can try
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

  5. #5

    Default

    Sure, here's the roo script I'm running and the DDL. I'm not sure that it's just not something I'm doing wrong though.

    Thanks!
    Attached Files Attached Files
    Last edited by deege; Mar 31st, 2011 at 04:56 PM. Reason: changed db file

  6. #6
    Join Date
    Dec 2005
    Posts
    930

    Default

    Your last command above worked OK for me:

    Code:
    com.foo.empty roo> database reverse engineer --schema AKS --package ~.domain --excludeTables "MANAGE_STUDENTS PERSON SESSIONS SESSION_BACKUP317 STATION_SPECIES USERS"
    32e0c2b Updated SRC_MAIN_RESOURCES/dbre.xml
    Deleted SRC_MAIN_JAVA/com/foo/empty/domain/ManageStudents.java
    Deleted SRC_MAIN_JAVA/com/foo/empty/domain/Sessions.java
    Deleted SRC_MAIN_JAVA/com/foo/empty/domain/StationSpecies.java
    Deleted SRC_MAIN_JAVA/com/foo/empty/domain/StationSpeciesPK.java
    Deleted SRC_MAIN_JAVA/com/foo/empty/domain/SessionBackup317.java
    Deleted SRC_MAIN_JAVA/com/foo/empty/domain/Users.java
    Deleted SRC_MAIN_JAVA/com/foo/empty/domain/Person.java
    ...
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

  7. #7

    Default

    Hmmm... I was using 1.1.0, and I just tried 1.1.2. It works now. Is this something that wasn't working in previous versions?

    Thanks!

  8. #8
    Join Date
    Dec 2005
    Posts
    930

    Default

    Wasn't added till 1.1.1.RELEASE (ROO-1410)
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

  9. #9

    Default

    That would explain it. My bad. Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •