我有2个表,即User和UserWallet现在我想在JPA中创建关于sql查询的查询: -
working SQL query:-
SELECT * FROM user u left join user_wallet uw on u.id=uw.user_id and uw.wallet_type=2 where u.id = 2;
JPA查询: -
not working:-
select w.address as walletAddress,u.id as id from User u left join u.userWallets w w.walletType=2 where u.id=:id