0 Replies Latest reply on Nov 13, 2017 7:38 AM by steven-garcia

    Inconsistency with @RevisionEntity

    steven-garcia

      I have a project which has its own set of entities that come from two different schemas

       

      I also need to bring in two projects that have their own persistence schemas and bring data from separate DBs, obviously, they have their own UserRevEntity to save audited entries in the schemas.

       

      So, this was working fine on version 4.3.6, but since trying to migrate to version 5.2.8, it just won't work, it complains about having more than one entity with @RevisionEntity annotation.  Now I understand the error when we try annotating entities in a same sessionFactory inside a same app, but this error should surely not be happening when building a SessionFactory which comes from different config files, which are part of a .jar file?

       

      On Hibernate forum, I've been suggested to try separating the SessionFactories and the JPA class scanning so that they don't conflict, so  I've had a look at jboss docs and tried naming the sessions differently:

       

      Core app: hibernate.session_factory_name: session1 Dependency: <property name="hibernate.session_factory_name">session2</property>

      But that still won't work

      I know there's been plenty spoken about this subject, but I can't find a situation/requirement similar to mine, I'd be tempted to consider this a bug as it worked fine in previous version and started breaking now, but it's almost impossible for me to provide a working sample as this relies on internal apps we only have on our servers