eclipselink

Outer joins with ON conditions in JPA

谁说胖子不能爱 提交于 2020-01-25 01:00:09
问题 I need a criteria query for the following SQL query. SELECT w.weight_id, w.weight, zc.charge FROM weight w LEFT OUTER JOIN zone_charge zc ON w.weight_id=zc.weight_id AND zc.zone_id=? <------- ORDER BY w.weight ASC The corresponding JPQL query would be like, SELECT w.weightId, w.weight, zc.charge FROM Weight w LEFT JOIN w.zoneChargeSet zc WITH zc.zone.zoneId=:id <------- ORDER BY w.weight I can't reproduce the same with criteria especially WITH zc.zone.zoneId=:id . The following criteria query

The class 'javax.persistence.Convert' is required to be in the selected libraries

旧巷老猫 提交于 2020-01-25 00:48:11
问题 When selecting a user library as the JPA implementation in Eclipse Dali's project settings, the following error message is displayed: The class 'javax.persistence.Convert' is required to be in the selected libraries But the class javax.persistence.Convert is correctly included in the classpath of my user library, so how can this problem be resolved? 回答1: This error message may arise, when the persistence jar file of the selected user library is part of your Eclipse project folder (for example

Filtering out elements based on sub elements with XMLStreamReader and StreamFilter

独自空忆成欢 提交于 2020-01-24 15:36:09
问题 I want to do something similar to XMLStreamReader example @BlaiseDoughan gave in his response to JAXB filtered parsing however I need to make the filtering decision based on sub elements not current node attributes. XMLStreamReader does not have a peek API like XMLEventReader. For example, I want to unmarshall the following XML into a Gump object whose records list ends up only containing 1 item, the record whose associated name does not start with "Filtered-". I'm using Eclipselink 2.3

Filtering out elements based on sub elements with XMLStreamReader and StreamFilter

半城伤御伤魂 提交于 2020-01-24 15:36:08
问题 I want to do something similar to XMLStreamReader example @BlaiseDoughan gave in his response to JAXB filtered parsing however I need to make the filtering decision based on sub elements not current node attributes. XMLStreamReader does not have a peek API like XMLEventReader. For example, I want to unmarshall the following XML into a Gump object whose records list ends up only containing 1 item, the record whose associated name does not start with "Filtered-". I'm using Eclipselink 2.3

Is it possible to use @XmlInverseReference where object and property are of same type?

前提是你 提交于 2020-01-24 13:08:08
问题 I'm using the MOXy JAXB implementation and make quite extensive use of the @XmlInverseReference annotation. However, I've recently encountered a scenario where this approach doesn't seem to work. If I have a class containing a field with a property that's the same type as the parent class, applying @XmlInverseReference seems to suppress the marshalling of that property altogether. Omitting the annotation yields a predictable StackoverflowException. Has anybody encountered this problem and

EclipseLink + JPA Guice Persist and Redeployments

跟風遠走 提交于 2020-01-24 01:10:08
问题 I have an infrastructure based on EclipseLink + JPA Guice Persist When I redeploy the application always I have caching problems with caching Entitys and I have to reboot the server (Oracle Weblogic 11g) .This problem is treated in a this post: https://bugs.eclipse.org/bugs/show_bug.cgi?id=326552 But, maybe is not a bug ¿?¿? ... I managed to solve the problem as follows : Originally I have centralized everything in a GuiceModule: 1.Create the module JPAPersist 2.Binding of a Initializer class

EclipseLink: Entities not loaded

大憨熊 提交于 2020-01-24 00:20:12
问题 I have a JPA-Project, which I'm trying to update to JPA 2.2.0 and EclipseLink 5.7.1 since I ran into bug 429992 of EclipseLink. With the new versions in place, I'm not able to execute my application anymore – EclipseLink throws an exception similar to the following (Short variant from my example below): [EL Warning]: metamodel: 2018-06-20 22:38:14.1--Thread(Thread[main,5,main])--The collection of metamodel types is empty. Model classes may not have been found during entity search for Java SE

Create Null Object Unmarshalling Empty Element with JAXB

南楼画角 提交于 2020-01-23 17:10:14
问题 I am using JAXB (EclipseLink implementation) in a JAX-RS webservice. When an empty element is passed in the XML request an empty object is created. Is it possible to set JAXB to create a null object instead? Example XML: <RootEntity> <AttributeOne>someText</AttributeOne> <EntityOne id="objectID" /> <EntityTwo /> </RootEntity> When unmarshalling, an instance of EntityOne is created and the id attribute set to "objectID" and an instance of EntityTwo is created with null attributes. Instead I

Can't create a EntityManager in JavaFx

笑着哭i 提交于 2020-01-22 02:24:06
问题 I'm experiencing a very unpleasing and not clear case with JPA and JavaFx , I tried to ask about this in two other threads which are : JPA EntityManager and JavaFx and Entity Manager not working in JavaFX but I was obliged to open a new thread here : the situation : I am using NetBeans and Postgres , JavaFx Fxml Application , what first I do is that I add a persistence unit which gives this : after working with the given advice and reading this page http://tomee.apache.org/jpa-concepts.html I

Can't create a EntityManager in JavaFx

浪尽此生 提交于 2020-01-22 02:24:06
问题 I'm experiencing a very unpleasing and not clear case with JPA and JavaFx , I tried to ask about this in two other threads which are : JPA EntityManager and JavaFx and Entity Manager not working in JavaFX but I was obliged to open a new thread here : the situation : I am using NetBeans and Postgres , JavaFx Fxml Application , what first I do is that I add a persistence unit which gives this : after working with the given advice and reading this page http://tomee.apache.org/jpa-concepts.html I