-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: update multiple records
PostPosted: Mon Mar 17, 2008 8:58 am 
Newbie

Joined: Fri Nov 16, 2007 3:05 pm
Posts: 14
Hi Guys,

Can any one tell me, is that possible for us to use alias name in a
HQL update query. I want to know, whether this is possible in Hibernate 3.0.

I was able to give alias name in update query, in Hibernate 3.1.2 version.

I could have used hibernate 3.1.2, but the websphere version that i am using is 5.0 ( this version of websphere uses JDK 1.3.1.9).

As far as i know, to use hibernate 3.1.2 jar, we need atleast jdk 1.4.

So can any one help me in this issue.

thanks in advance


Hibernate 3.0


the HQl query i want to execute is

update GroupParticipantLink gpl set childParticipantStatus=:status where gpl.groupParticipantLinkKey.caseId=:caseid and gpl.groupParticipantLinkKey.eventSeq=:eventseq and gpl.groupParticipantLinkKey.groupSeq=:groupseq and gpl.groupParticipantLinkKey.parentParticipantId=:parentparticipantid

I have a composite primary key in this class.



[b]
The mapping file is

<class name="GroupParticipantLink" table="group_participant_link">
<composite-id name="groupParticipantLinkKey" class="GroupParticipantLinkKey">
<key-property name="caseId" type="string" column="case_id"/>
<key-property name="eventSeq" type="integer" column="event_seq"/>
<key-property name="groupSeq" type="integer" column="group_seq"/>
<key-property name="participantId" type="integer" column="participant_id"/>
<key-property name="parentParticipantId" type="integer" column="parent_participant_id"/>
</composite-id>
<property name="childParticipantStatus" type="string" column="child_participant_status"/>
</class>

[b]


Top
 Profile  
 
 Post subject: update multiple records
PostPosted: Fri May 02, 2008 4:41 am 
Newbie

Joined: Fri Nov 16, 2007 3:05 pm
Posts: 14
Hi Guys,

The websphere version i am using is 5.0. And the jdk it is pointing is
JDK 1.3.1.9.

For me i need hql bulk update queries, where i should give a alias name
for the Entity that i am updating. I was not able to give alias name in
hql, in Hibernate 3.0

I was able to give alias name in Hibernate 3.1.2. But the hibernate jar that comes with Hibernate3.2.1 , is compiled using JDK 1.4.9. So when i use this jar in Websphere 5.0 , i was getting some "class minor version error". So i was not able to use this Hibernate version 3.2.1.

Finally i got a solution, by compiling the Hibernate 3.1.2 source using JDK 1.4.4. And when i used this jar, i was not getting any error.

I hope this will be usefull.

thanks,
krishna.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.