12 Replies Latest reply on Dec 28, 2011 9:17 AM by Scott Marlow

    Jboss7 with Insert into select query

    sabbirali kadiwala Newbie

      In our application we used "insert into select" query for improve performance which is running fine in jboss6.

      But

      with jboss7 it is giving error as below

       

      ErrorMessage:javax.ejb.EJBTransactionRolledbackException: org.hibernate.QueryException: can only generate ids as part of bulk insert with either sequence or post-insert style generators [insert into ScheduleDetails(mstSchedule,articleCode,vendorCode,valuationClass,ruleClass) select  ts.mstSchedule,ma.id.articleCode,tg.vendorCode,tg.valuationClass,'O' from com.eks.ias.service.core.entity.TransGp tg, com.eks.ias.service.core.entity.MstArticle ma,com.eks.ias.service.schedule.entity.TransSchedule ts  where ts.id.scheduleReferenceId = :scheduleRefId and tg.id.siteCode = :siteCode and ma.isDeleted=false and tg.id.articleCode=ma.id.articleCode  and tg.id.siteCode = ts.mstSchedule.mstSite.siteCode and ts.mstSchedule.mstSite.sapVersion = ma.id.sapVersion and ma.mstMc.mcCode = ts.id.mcCode  ]

       

      i think both are using JPA 2.x so it should work on jboss7