[英]in Hibernet 1 to many mapping done by using join column how write HQL query to create inner join using that join column
I have a table 1 Tb_FileMaster
with the fields (file_id file_name, file_path)
我有一个表1
Tb_FileMaster
其中包含字段(file_id file_name, file_path)
file_id is join column attribute in other table file_id是其他表中的连接列属性
How can I select records associated with MAX file_id
selected from second table 如何选择与从第二个表中选择的
MAX file_id
相关的记录
In HQL it would look something like this: 在HQL中,它看起来像这样:
select secondTable.* FROM Tb_FileDetails secondTable
join secondTable.tb_FileMaster firstTable
where firstTable.file_id = (select max(x.file_id) from Tb_FileMaster x)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.