1 Reply Latest reply on Sep 23, 2016 1:00 PM by marhat

    Hibernate @DynamicUpdate in Wildfly 10.1?

    marhat Newbie



      I am currently exploring Wildfly 10.1 and Hibernate 5 after years working in earlier versions of both (JBoss 6 / Hibernate 3).


      So far, things have been going well, and have managed to get up and running quicker than I expected! However, there is one feature in particular that I can't seem to activate and wondering if anyone can offer some advice?


      Specifically, I am looking for the @DynamicUpdate and @DynamicInsert annotations one can set on an entity to improve Hibernate performance when it's updating entities to the database. In JBoss 6 / Hibernate 3 I did it another way which I can see has long since been deprecated. Anyway, my problem is, I can't seem to get org.hibernate.annotations on my classpath with any obvious HIbernate JAR that is available to Wildfly or part of the Maven org.wildfly.bom for 10.1.0?


      I'm not sure if there is a difference between hibernate-annotations (which seems legacy?) vs hibernate-commons-annotations. Wildfly 10 does seem to provide hibernate-commons-annotations but this doesn't have any references to DynamicUpdate / DynamicInsert. The latest version of hibernate-annotations (on Maven) appears to be 3.x - so I'm thinking this is legacy.


      I'm skipping forward several versions of both JBoss and Hibernate from what I am used to - but am I missing something with this? Are these annotations available somewhere else or handled in a different way now? Do I need to specifically add a legacy jar to my Maven POM (which I haven't wanted to do as seems to be asking for trouble....).


      Any help would be greatly appreciated. Thanks!

        • 1. Re: Hibernate @DynamicUpdate in Wildfly 10.1?
          marhat Newbie

          Ok - I have now solved my issue.


          Hibernate annotations jar is no longer required as everything required is in hibernate-core jar.

          Although I had experimented with this, I had a corruption with how Maven had stored the hibernate-core jar that I hadn't spotted. So although the org.hibernate.annotations package was on my classpath, various classes were missing!! Agh! A clear install of the maven repository has sorted my issue.