EclipseLink @OneToMany 关系大小 JPQL 异常

EclipseLink @OneToMany relationship size JPQL exception

我尝试将在 Wildly/Hibernate 上运行良好的 java ee 应用程序部署到 GlassFish/EclipseLink,但出现这样的错误:

Problem compiling [DELETE FROM ProviderService ps WHERE :work_station MEMBER OF ps.workStations AND ps.workStations.size = 1].
[81, 101] The state field path 'ps.workStations.size' cannot be resolved to a valid type.
 81, 101] The state field path 'ps.workStations.size' cannot be resolved to a valid type.

有没有可能 运行 休眠玻璃鱼?如果是这样,我怎么能在 build.gradle.

中配置这样的东西

我在 build.gradle 条件选择中使用 Wildfly remote/Wildfly 嵌入以使用 Arquillian 进行测试(工作正常),现在添加 Glassfish remote/Glassfish 嵌入但在这里我不能编译出现如上错误。我也收到这样的东西:

    ArquillianServletRunner not found. Could not determine ContextRoot from ProtocolMetadata, please contact DeployableContainer developer.
java.lang.IllegalArgumentException: ArquillianServletRunner not found. Could not determine ContextRoot from ProtocolMetadata, please contact DeployableContainer developer.
    at org.jboss.arquillian.protocol.servlet.ServletUtil.determineBaseURI

JPQL 无效。 JPQL 由 JPA 规范定义,为了可移植性,您必须坚持使用正确的语法。在这种情况下,有一个函数“SIZE”。应该是

DELETE FROM ProviderService ps WHERE :work_station MEMBER OF ps.workStations AND SIZE(ps.workStations) = 1