Opened 4 years ago

Closed 4 years ago

#1084 closed bug (fixed)

Oracle database does not support "as" for aliasing table names in from cluase

Reported by: pashazadeh Owned by:
Priority: trivial Milestone: 8.6.1
Component: Core Version: 8.6
Keywords: Invalid Oracle QUery Cc:

Description

In Oracle database as can only be used for column aliasing, and table aliasing must be done without as.

So in Oracle you can not write:

select a.* from t1 as a

and must write

select a.* from t1 a

In HibenateDocumentDAO class there are some queries which aliases table names with as keyword, and it results SQLGrammerExceptions.

for example following query:

select distinct(B.ld_tag) 
  from ld_tag as B, ld_document as C
 where B.ld_tenantid= :tenantId
   and C.ld_id=B.ld_docid
   and C.ld_deleted=0 
UNION 
select distinct(D.ld_tag)
  from ld_foldertag as D, ld_folder as E
 where D.ld_tenantid = :tenantId 
   and E.ld_id=D.ld_folderid 
   and E.ld_deleted=0
}}]

there are multiple queries with this problem in this class.
 

Change History (1)

comment:1 Changed 4 years ago by admin

  • Priority changed from major to trivial
  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.