我在两个实体A和B之间有@ManyToMany关系,所以Hibernate为我创建了一个名为A_B的未映射表到数据库中,而我的java代码中没有相关的实体。另外,我正在尝试使用CriteriaAPI从我的dao中查询A_B表。有没有人能帮我想出一个解决方案?我正在尝试在CriteriaAPI中执行类似以下示例的操作 select * from A_B where A_B.column = id_input;
Select c.id, (Select c2.value from customer_table c2 Where c2.id = c.id And c2.key = 'service-category') as "service-category",
(Select c2.value from customer_table