-->
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.  [ 3 posts ] 
Author Message
 Post subject: Invalid SQL Generation
PostPosted: Wed Aug 19, 2009 9:37 am 
Newbie

Joined: Tue May 31, 2005 7:50 am
Posts: 7
Hello,

The following name query is generating incorrect SQL (see below). Why would this be happening?

<query name="updateDownloadDate"><![CDATA[
update Tcat t
set t.downloadDate = :downloadDate
where t.target = :target and
t.plan.name = :plan and
t.payload = :payload
]]>
</query>

update
dxc.tcat,
set
tcat_download=?
where
tcat_target=?
and plan_name=?
and tcat_payload=?


Top
 Profile  
 
 Post subject: Re: Invalid SQL Generation
PostPosted: Wed Aug 19, 2009 11:49 am 
Regular
Regular

Joined: Mon Jan 05, 2009 6:42 pm
Posts: 99
Location: IL
Hi,
I'm not sure If this would solve the issue but out of curiosity why do you need an alias when you have just one Entity/Table in the query?

Have you tried this removing the alias?:-
<query name="updateDownloadDate"><![CDATA[
update Tcat set downloadDate = :downloadDate
where target = :target and
plan.name = :plan and
payload = :payload
]]>
</query>


Top
 Profile  
 
 Post subject: Re: Invalid SQL Generation
PostPosted: Wed Aug 19, 2009 1:19 pm 
Newbie

Joined: Tue May 31, 2005 7:50 am
Posts: 7
Thanks for your reply. I'll try it and see.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.