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.