1 Reply Latest reply on Nov 8, 2011 5:48 AM by adamw

    Generating custom revision entity with ant

    mikulka

      I'm using hibernatetool to create sql for the tables. I have created a custom revision entity.

       

      If I use HibernateToolTask without custom revision entity, then none of the envers tables are created in sql.

      If I use HibernateToolTask with custom revision entity, then the custom revision entity table is created in sql.

      If I use EnversHibernateToolTask without custom revision entity, then the default revision entity table is created into configured envers schema in sql.

      If I use EnversHibernateToolTask with custom revision entity, then the custom revision entity table is created into default schema in sql.

       

      How can I make the custom revision entity generation work like the default revision entity generation?

      1) Don't create it if HibernateToolTask is used.

      2) Create it into defined envers schema if EnversHibernateToolTask is used.

        • 1. Re: Generating custom revision entity with ant
          adamw

          Hmm creating the rev entity in the wrong schema may be a bug. Can you try how it works with hbm2ddl = auto?

           

          As the revision entity is just a normal entity, using HibernateToolTask with it will generate schema for it, so that's expected.

           

          The only wrong behaviour I see is EHTT + custom rev ent.

           

          Adam