5 Replies Latest reply on Sep 29, 2010 10:05 AM by Iván Pazmiño

    Generate selected entities

    Iván Pazmiño Novice


      I'm generating some tables in my schema with the seam-gen tool, but I need to instruct the seam generate commando not to generate every table it finds in the schema, but only a few. Is it possible to do so?

      Thanks in advance.

        • 1. Re: Generate selected entities
          Leo van den berg Master


          As far as I know it's a all-or-nothing scenario, meaning you can't exclude some Tables- Hopefully I am wrong and you fine-tune it, but you need the Hibernate experts to answer that question (although it's a Seam-gen problem)


          • 2. Re: Generate selected entities
            Yasser Hawari Newbie

            check how to edit this file. it is a hibernate thing. (generated by seam, but empty initially)

            • 3. Re: Generate selected entities
              Iván Pazmiño Novice

              Thanks for your replies.

              I have checked the build.xml file and says it would look for the seam-gen.reveng.xml inside the application's resources folder and copy it to the seam installation's hibernatetools folder. Then it should read the configured exceptions and generate according to the rules.

              The only instruction inside my file is <table-filter match-name="*.*" exclude="true"/> in the hope it would not generate any entity, just to try it is working. But, the file doesn't get copied and generates as if it doesn't exist. I also tried modifying directly seam-gen/hibernatetools/seam-gen.reveng.xml but wouldn't help either.

              I'm working with 2.2 version. What else should I try?

              • 4. Re: Generate selected entities
                Iván Pazmiño Novice

                I have tried using wildcards and the actual table name, but none would work. All the entities keep being generated. To the generation goal I'm adding restart in the hope of a clean up or something but nothing changes. I also tried to just change a column name. Also without success. I'm sure something is wrong in my generation process or I'm missing some clean up step. Any ideas?

                This is my seam-gen.reveng.xml file

                <?xml version="1.0" encoding="UTF-8"?>
                <!DOCTYPE hibernate-reverse-engineering SYSTEM "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd" >
                   <table-filter match-name="JBPM_LOG" exclude="true"/>
                   <table name="JBPM_JOB">
                          <column name="ACTION_" property="activity" />

                and after every change I just type ./seam generate restart

                • 5. Re: Generate selected entities
                  Iván Pazmiño Novice

                  The problem is with oracle database. I've tried with mysql and worked alright. Sigh.
                  I've tried specifying schema, catalog and both but won't work either.
                  Is it a bug? or some more config would make the trick?