我想从INunit的数据库中检索数据。 ("value1", "value2")
以下是请求正文示例。
{
"researchers":null,
"unit": ["value1","value2"],
"agency":null,
"date": null,
"status": null,
"budget": null
}
Run Code Online (Sandbox Code Playgroud)
但是当我尝试使用给定的参数请求时,我得到了org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected AST node: {vector}. 但是当我像这样传递单个值时unit;unit:["value1"] ,效果很好。我认为我的存储库有问题,但我不知道问题出在哪里。
以下是我的存储库:
@Query("select r from Research r " +
"left join r.fundingAgencies fundingAgencies " +
"left join r.researchers researchers " +
"where (:budgetStart is null or :budgetEnd is null or r.budget between :budgetStart and :budgetEnd )" +
"and (:startDate is null or r.startDate >= :startDate) " +
"and (:endDate is null …Run Code Online (Sandbox Code Playgroud)