7 Replies Latest reply on Jan 18, 2010 5:29 AM by Max Rydahl Andersen

    How to reverse engineer tables from multiple schemas?

    Wouter Hartog Newbie

      My setup:

      - MySQL 5.1

      - Seam 2.2

      - Jboss Tools 3.0

      - Eclipse 3.4.2

       

      I can’t get multiple schemas to reverse engineer. It seems like I can only do one schema at a time, but then my classes are not annotated with a specific schema, so when I would have the same table name in multiple databases, I may have a problem.

      What I tried:

       

      -          Removing hibernate.default-catalog property in persistence.xml (I already removed the hibernate.default-schema, since that seemed to confuse MySQL)

      -          Leaving out the schema name in the connection-url in the myproject-ds.xml (datasources)

      -          Leaving out the schema name in the hibernate.connection.url property in the hibernate.cfg.xml file

      In the Hibernate Code Generation Configuration tool (which is a really cool config tool), I added a reveng.xml file that included two schemas, but it still only reverse engineered the one schema.

       

       

      How can I get tables from multiple schemas to reverse engineer?