【发布时间】:2021-12-26 17:49:38
【问题描述】:
我一直在搜索,但我的问题没有找到答案。
我有以下代码:
public ScriptInfo findByForeignKey(int id) {
Session currentSession = entityManager.unwrap(Session.class);
Query<ScriptInfo> theQuery =
currentSession.createQuery("Select *
from SCRIPT_INF AND SPRINT
where FK_ID_SPRINT=:idSprint
AND FK_ID_SPRINT=SPRINT.ID_SPRINT");
theQuery.setParameter("idSprint", id);
}
我不知道如何放置返回,所以它返回对象ScriptInfo 过滤。
【问题讨论】:
-
在你创建的对象上添加return语句。