如何使用Hibernate获取选定行

如何使用Hibernate获取选定行,hibernate,hql,Hibernate,Hql,请帮助我使用Hibernate从下面给出的查询中获取结果。请将这些SQL查询转换为Hibernate。多谢各位 select project_id, project_name from project SELECT * FROM `developer` WHERE `scrum_master_id` IS NULL 您需要有Project,Developer,ScrumMaster持久化和一个从Developer到ScrumMaster的关联 select project_id, proj

请帮助我使用Hibernate从下面给出的查询中获取结果。请将这些SQL查询转换为Hibernate。多谢各位

select project_id, project_name from project

SELECT * FROM `developer` WHERE `scrum_master_id` IS NULL 
您需要有
Project
Developer
ScrumMaster
持久化和一个从
Developer
ScrumMaster
的关联

select project_id, project_name from project

FROM developer d where d.scrum_master_id is null
您需要有
Project
Developer
ScrumMaster
持久化和一个从
Developer
ScrumMaster
的关联

select project_id, project_name from project

FROM developer d where d.scrum_master_id is null
在查询中使用映射名称(类名和字段名),而不是表名或列名,我已经写了相同的名称供您理解


在查询中使用映射名称(类名和字段名),而不是表名或列名,我写了相同的名称供您理解。

使用普通值关联实体不是一件好事(
d.scrum\u master\u id
):)使用普通值关联实体不是一件好事(
d.scrum\u master\u id
):)