toplink

COALESCE in JPA namedQuery

大兔子大兔子 提交于 2019-11-28 03:29:26
问题 I have the following namedQuery select new test.entity.Emp(COALESCE(k.projectId,'N') as projectId, k.projectName) from Emp o inner join o.projects k However I am getting error expecting RIGHT_ROUND_BRACKET, found '(' How to handle COALESCE in namedQuery? Are there any other ways to handle null values in JPA? 回答1: Coalesce is supported by JPA 2.0 API. The new construct is proprietary to Hibernate, not necessarily supported in all JPA implementations. First try the query without also trying to

JPA Implementations - Which one is the best to use? [closed]

微笑、不失礼 提交于 2019-11-27 20:02:46
I have made use of the following JPA implementations: Hibernate, Toplink, OpenJPA Each of them has their own strengths and weaknesses. I found Hibernate the most advanced of the three except that it mixed some of its own enhancements with JPA which made it difficult to switch out to other providers. Most importantly, its query parser was much more lenient when interpreting JPA. They make it slightly difficult to get the correct libraries to support hibernate because I found it a mission trying to get the right versions of all the dependencies. Toplink was ok but one is left with the feeling

GWT with JPA

最后都变了- 提交于 2019-11-27 05:42:01
问题 I'm trying to build database application using GWT 1.5.3. I use JPA annotations with my objects. It seems in hosted mode GWT's RPC works fine. But when I try to compile my app using GWT-compiler I get errors like: "The import javax.persistence cannot be resolved", "Entity cannot be resolved to a type". toplink-essentials.jar is already included in my project path. What settings else do I need to solve this problem? 回答1: You can use Gilead (http://sourceforge.net/projects/gilead/) library to

No Persistence provider for EntityManager named

守給你的承諾、 提交于 2019-11-26 01:21:01
问题 I have my persistence.xml with the same name using TopLink under the META-INF directory. Then, I have my code calling it with: EntityManagerFactory emfdb = Persistence.createEntityManagerFactory(\"agisdb\"); Yet, I got the following error message: 2009-07-21 09:22:41,018 [main] ERROR - No Persistence provider for EntityManager named agisdb javax.persistence.PersistenceException: No Persistence provider for EntityManager named agisdb at javax.persistence.Persistence.createEntityManagerFactory