Closed yangzhixiao closed 8 years ago
like this:
.where(xxxx) .select(m -> new UserWalletModel(m.getId(), m.getName(), m.getWallet().getBalance())) .toList();
as like HQL:
.createQuery("select new com.yzx.discover.model.UserWalletModel(u.id, u.name,u.wallet.balance) " + "from UserEntity u " + "where u.wallet.balance > :balance") .setParameter("balance", balance) .list();
I actually added support for that a couple of weeks ago.
Look for "Custom Tuples" in the Query Guide:
http://www.jinq.org/docs/queries.html
like this:
.where(xxxx) .select(m -> new UserWalletModel(m.getId(), m.getName(), m.getWallet().getBalance())) .toList();
as like HQL:
.createQuery("select new com.yzx.discover.model.UserWalletModel(u.id, u.name,u.wallet.balance) " + "from UserEntity u " + "where u.wallet.balance > :balance") .setParameter("balance", balance) .list();