-
1. Re: Jboss7 with Insert into select query
nickarls Dec 23, 2011 1:35 AM (in response to sabbirali)The Hibernate versions in AS6 and AS7 so it could also be something over there that has changed.
-
2. Re: Jboss7 with Insert into select query
sabbirali Dec 23, 2011 1:45 AM (in response to nickarls)So we need to change code or some alternative available for that.
In my application i have not change any code...
-
3. Re: Jboss7 with Insert into select query
nickarls Dec 23, 2011 1:49 AM (in response to sabbirali)Other thing you might want to check is that all your imports/dependencies are still valid so that you don't accidently lose any annotations related to the ID generation etc. But one would think such things would be compile/deployment errors.
-
4. Re: Jboss7 with Insert into select query
sabbirali Dec 23, 2011 2:19 AM (in response to nickarls)I just remove @Pool anotation [which is not more in jboss7] but it not required for @Id generation.
and also i remove @IgnoreDependency which is not more required in jboss7.
if there are deployment error then whole application will not work properly right ?
But
other module are working fine except "insert into select" query used module.
Please see link http://relation.to/21342.lace , JBoss AS7 supporting standard JPA 1.0 and 2.0.
-
5. Re: Jboss7 with Insert into select query
smarlow Dec 23, 2011 7:00 AM (in response to sabbirali)Could you show how the involved table (ScheduleDetails) is mapped and what database (dialect really) is in use.
-
6. Re: Jboss7 with Insert into select query
sabbirali Dec 26, 2011 1:22 AM (in response to smarlow)Schedule Details entity looks like below
@Entity
@Table(name = "SCHEDULE_DETAILS")
@SequenceGenerator(name = "SCHEDULE_DETAILS_ID_GENERATOR", sequenceName = "MST_SCHEDULE_DETAILS_ID_SEQ", initialValue = 1, allocationSize = 1)
public class ScheduleDetails implements java.io.Serializable
{
private Long scheduleDetailsId;
private MstSchedule mstSchedule;
.....
// we have some constructor also
...
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SCHEDULE_DETAILS_ID_GENERATOR")
@Column(name = "SCHEDULE_DETAILS_ID", unique = true, nullable = false, precision = 38, scale = 0)
public Long getScheduleDetailsId() {
return this.scheduleDetailsId;
}
Only MstSchedule reference in ScheduleDetails, other table does not have relation with ScheduleDetails like TransSchedule,MstArticle,TransGp
I used Database dialect : <property name="hibernate.dialect" value="org.hibernate.dialect.OracleDialect" />
-
7. Re: Jboss7 with Insert into select query
smarlow Dec 26, 2011 11:14 PM (in response to sabbirali)It looks like some code changes might be needed here. @GeneratedValue(SEQUENCE) maps to org.hibernate.id.enhanced.SequenceStyleGenerator, which isn't checked for in org.hibernate.hql.internal.ast.HqlSqlWalker.supportsIdGenWithBulkInsertion().
As previously discussed here, hibernate.id.new_generator_mappings is set to true by default, and as a result, class SequenceStyleGenerator is used instead of class SequenceHiLoGenerator (which is checked for in the above supportsIdGenWithBulkInsertion).
Could you create a Hibernate (against 4.0.0.Final) jira for this bug, the link is here.
Please post the created jira link here.
-
8. Re: Jboss7 with Insert into select query
sabbirali Dec 27, 2011 3:50 AM (in response to smarlow)I have created JIRA Please find below link
https://hibernate.onjira.com/browse/HHH-6920
in which version we expected for resolution of above issue.
-
9. Re: Jboss7 with Insert into select query
smarlow Dec 27, 2011 9:33 AM (in response to sabbirali)Thanks for adding the jira. Could you also add the query that is failing as well.
-
10. Re: Jboss7 with Insert into select query
sabbirali Dec 28, 2011 5:23 AM (in response to smarlow)I already add query in discussion but once again i post same please find below
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
-
11. Re: Jboss7 with Insert into select query
sabbirali Dec 28, 2011 7:45 AM (in response to smarlow)Thanx all, Issue got resolved
But
How i can co-ordinate with jboss7 ?
Should i wait for next release version of jboss7 ?
From where i get resolved code or resolved jboss7 server [issued fixed]
Please appreciate your reply.
-
12. Re: Jboss7 with Insert into select query
smarlow Dec 28, 2011 9:17 AM (in response to sabbirali)You can watch AS7-2076 which also needs Hibernate 4.0.1.Final.