目前我使用CreateSQLQuery查询模型使用HIbernate从数据库中读取数据。现在,我想通过使用HQL或Hibernate Criteria来修改我的查询。我的查询如下所示。
select concat(d.AREA,' ',d.CITY) as location, a.TRANSFERRED_DATE as ActualTransferDate, concat(c.SCAN_CODE,',',c.SERIAL_NO) as ScanserialCode, c.MODEL_NO as ModelNum, c.ASSET_NAME as AssetName from table_transfer a, table_category b, table_asset c, table_location d where a.ASSET_ID = c.ASSET_ID and b.ASSET_CATEGORY_ID = c.ASSET_CATEGORY_ID and a.TRANSFER_TO_LOCATION=d.LOCATION_ID"
我不知道如何将其转换为基于Hibernate SQL或Criterion的查询。任何人都可以帮助我吗?