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.  [ 1 post ] 
Author Message
 Post subject: HQL Bug?
PostPosted: Thu Mar 06, 2008 7:12 pm 
Regular
Regular

Joined: Fri Jan 27, 2006 2:32 pm
Posts: 102
Location: California, USA
I think this is a bug, but it might be a mapping problem. Can anyone else comment. This is version 1.2.1.

Here's the HQL:

Code:
from DiscovererReport r where r.ReportName like 'CM - %' and r.Owner.Username = 'PELTON' order by r.ReportName


Here's the generated SQL (on Oracle database);

Code:
select discoverer0_.doc_id as doc1_22_, discoverer0_.doc_name as doc2_22_, discoverer0_.doc_developer_key as doc3_22_, discoverer0_.doc_description as doc4_22_, discoverer0_.doc_created_date as doc5_22_, discoverer0_.doc_created_by as doc6_22_, discoverer0_.doc_updated_date as doc7_22_, discoverer0_.doc_updated_by as doc8_22_, discoverer0_.doc_eu_id as doc9_22_ from eulmgr.eul4_documents discoverer0_, eulmgr.eul4_eul_users discoverer1_ where (discoverer0_.doc_name like 'CM - %' )and(discoverer1_.eu_username='PELTON'  and discoverer0_.doc_eu_id=discoverer1_.eu_id) order by  discoverer0_.doc_name discoverer0_.doc_name]



And the error:
System.Data.OracleClient.OracleException: ORA-00933: SQL command not properly ended


It is complaining about the "order by" statement -- there is an extra "discoverer0_.doc_name" at the end of the statement.


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

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.