JPA MySql 同时对两个字段进行in的查询

JPA

List<UserBoatInfoEntity> findByAccountIdInAndBoatIdIn(List<String> accountIdList, List<String> boatIdList);

MySql

SELECT * FROM "user_boat_info"
where (account_id,boat_id)
in 
(
	('009mbNpLqDmmfVG6bFb', 'HVXxZcyz443bgzol81w'),
	('00fAlgLs0zgmx4I5fi3', '4ZK8bTxVfeRiruwPWQl'),
	('00fAlgLs0zgmx4I5fi3', '1DQ9NVOlyiMUyGzhlOZ')
)

你可能感兴趣的:(mysql,数据库)