多对一选择语句?
如何在JPA中
以多对一的方式选择多对一的关系如何做select语句示例
学生-班级
学生是多对一班级
班级是班级中的一对多学生
,我可以选择
select c from Class c where c.studentid = :studentid
学生中是否有班级实例?
我如何对 Student 执行相同的选择语句?
How to select with relationship is many to one in JPA
in Many to One How to do select statement example
Student - Class
student is many to one class
class is one to many student
in class i can select
select c from Class c where c.studentid = :studentid
if if in student it have instance of Class?
how i do the same select statement about with Student ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不知道你在问什么,但是怎么样?
Not sure what you are asking, but how about?
从您编写示例查询的方式来看,班级对于学生来说是多对一的。
假设您提到的关系,查询将为
班级学生(根据限制放置在哪里)
The way you have written the sample query, it looks that class is many to one to student.
Assuming the relationship that you have mentioned, the queries will be
For students of the class (where to be put at per the restriction)