当我执行下面的查询时,我得到了异常。如何在 JPQL 查询中指定架构。我的数据库架构是公开的。数据库是PostgreSQL。
这是我的查询:
SELECT p FROM profile p WHERE p.mobile_no = :mobileNo
这是例外情况:
java.lang.IllegalArgumentException: An exception occurred while creating a query in EntityManager:
Exception Description: Problem compiling [SELECT p FROM profile p WHERE p.mobile_no = :mobileNo].
[14, 21] The abstract schema type 'profile' is unknown.
[30, 41] The state field path 'p.mobile_no' cannot be resolved to a valid type.
org.eclipse.persistence.internal.jpa.EntityManagerImpl.createQuery(EntityManagerImpl.java:1746)
org.eclipse.persistence.internal.jpa.EntityManagerImpl.createQuery(EntityManagerImpl.java:1767)
za.co.ezimax.database.ProfileDAO.get(ProfileDAO.java:15)
za.co.ezimax.business.Business.register(Business.java:44)
za.co.ezimax.rest.DatabaseTestServlet.doGet(DatabaseTestServlet.java:87)
javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
慕妹3242003
相关分类