java - How can create HQL Query like Laravel? -


my laravel eloquent following:

module::select(['a', 'b'])                 ->whereraw("or ='one' or = 'five' or ='ten'")                 ->distinct()                 ->orderby('a', 'asc')                 ->get(); 

how can convert hibernate?

you can use tosql() method sql query.

for example

db::table('users')->tosql();  

returns query

select * users 

then have translate sql hql, using manual.


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -