eclipselink

HikariPool-1 - jdbcUrl is required with driverClassName

随声附和 提交于 2020-07-05 00:06:33
问题 I went back to programming my old program https://github.com/JonkiPro/REST-Web-Services. I've updated Spring Boot from version 15.6 to version 2.0.0. I have encountered many problems with compilation, but I can not deal with one. Well, during compilation, he throws me in the console 2018-03-18 21:54:53.339 ERROR 3220 --- [ost-startStop-1] com.zaxxer.hikari.HikariConfig : HikariPool-1 - jdbcUrl is required with driverClassName. 2018-03-18 21:54:55.392 INFO 3220 --- [ost-startStop-1] j

EclipseLink query exceptions using EntityGraph: “You must define a fetch group manager at descriptor” AND “Fetch group cannot be set on report query”

爱⌒轻易说出口 提交于 2020-06-29 03:53:00
问题 I have the following design: For reference, I'm only posting the SimpleGame entity: @Entity @Table(name = "\"SimpleGames\"") @NamedQuery(name = SimpleGame.FIND_ALL, query = "SELECT ga FROM SimpleGame ga") @NamedQuery(name = SimpleGame.FIND_ALL_JOIN_SCORES_GROUP_BY_GAME_ID, query = "SELECT ga FROM SimpleGame ga JOIN ga.simpleScores sc GROUP BY ga.id") @NamedEntityGraph(name = SimpleGame.FETCH_SCORES, attributeNodes = {@NamedAttributeNode("simpleScores")}) public class SimpleGame implements

EclipseLink query exceptions using EntityGraph: “You must define a fetch group manager at descriptor” AND “Fetch group cannot be set on report query”

前提是你 提交于 2020-06-29 03:52:33
问题 I have the following design: For reference, I'm only posting the SimpleGame entity: @Entity @Table(name = "\"SimpleGames\"") @NamedQuery(name = SimpleGame.FIND_ALL, query = "SELECT ga FROM SimpleGame ga") @NamedQuery(name = SimpleGame.FIND_ALL_JOIN_SCORES_GROUP_BY_GAME_ID, query = "SELECT ga FROM SimpleGame ga JOIN ga.simpleScores sc GROUP BY ga.id") @NamedEntityGraph(name = SimpleGame.FETCH_SCORES, attributeNodes = {@NamedAttributeNode("simpleScores")}) public class SimpleGame implements

EntityGraph - You must define a fetch group manager at descriptor in order to set a fetch group on the query

谁都会走 提交于 2020-06-23 06:48:32
问题 I would like use Entity Graphs in EclipseLink and GlassFish. @Entity @NamedQueries({ @NamedQuery(name = "invoice.all", query = "SELECT i FROM Invoice i")}) @NamedEntityGraph(name = "graph.invoice", attributeNodes = {@NamedAttributeNode("invoiceNum")}) @Table(name = "INVOICE") public class Invoice implements Serializable { private int id; private String bizonylatSzam; ... } EntityManager em = getEntityManagerFactory().createEntityManager(); EntityGraph eg = em.createEntityGraph("graph.invoice"

JPA @Transient fields being cleared before @PreUpdate method is called

纵饮孤独 提交于 2020-06-10 07:47:45
问题 I have an User Entity class that I'm trying to do password hashing for. I thought that the easiest way to do this would be to create a password field annotated with @Transient and a hashed password field that is set just before the object is persisted with a method annotated with @PrePersist and @PreUpdate. So I have something like this: @Transient private String password; private String hashedPassword; @PrePersist @PreUpdate private void hashPassword() { if(password != null) { hashedPassword

JPA @Transient fields being cleared before @PreUpdate method is called

好久不见. 提交于 2020-06-10 07:47:05
问题 I have an User Entity class that I'm trying to do password hashing for. I thought that the easiest way to do this would be to create a password field annotated with @Transient and a hashed password field that is set just before the object is persisted with a method annotated with @PrePersist and @PreUpdate. So I have something like this: @Transient private String password; private String hashedPassword; @PrePersist @PreUpdate private void hashPassword() { if(password != null) { hashedPassword

Why doesn't NetBeans IDE see the generated sources?

纵饮孤独 提交于 2020-06-09 16:45:41
问题 I have a Maven-built web-app that uses JPA 2.0 at the back end. The JPA provider is EclipseLink 2.3.2. When I build the project (and it deploys runs successfully) it builds the JPA meta-model in the directory ${basedir}/target/generated-sources/annotations/ Yet the IDE doesn't see the classes defined there. Little red dots with an exclamation point everywhere. Yet I can navigate to those files in the Projects window and open the generated source files. Does this happen to anyone else and does

Why doesn't NetBeans IDE see the generated sources?

只愿长相守 提交于 2020-06-09 16:43:05
问题 I have a Maven-built web-app that uses JPA 2.0 at the back end. The JPA provider is EclipseLink 2.3.2. When I build the project (and it deploys runs successfully) it builds the JPA meta-model in the directory ${basedir}/target/generated-sources/annotations/ Yet the IDE doesn't see the classes defined there. Little red dots with an exclamation point everywhere. Yet I can navigate to those files in the Projects window and open the generated source files. Does this happen to anyone else and does

How to get the SQL String From JPQLQuery

别说谁变了你拦得住时间么 提交于 2020-05-27 05:17:24
问题 I'm using EclipseLink. I've a JPQLquery and I want to get the sql String.. Now I'm doing in this way: EJBQueryImpl qi = (EJBQueryImpl)jpqlQuery; String sqlQueryString = qi.getDatabaseQuery().getSQLString(); The problem is that in the sqlQueryString the constant are replaced with ? I've tried to get the values navigating the expressions trees ( getSelectionCriteria() and getHavingCriteria() ) but in this way I loose the type... Do any one ever have a problem like this one? 回答1: Quoted from the

Alter sequence in H2

心已入冬 提交于 2020-05-13 05:27:13
问题 I'm using Postgres database in production and H2 for tests. I want to create a new sequence for an existing table - so in Liquibase I wrote this: <changeSet id="Add sequence for BOOKS" author="library"> <createSequence sequenceName="BOOKS_SEQ" incrementBy="500" startValue="1"/> </changeSet> My Entity looks like this: @Entity @Table(name = "BOOKS") @SequenceGenerator(name = "BOOKS_SEQ", allocationSize = 500) public class Book { @Id @GeneratedValue(generator = "BOOKS_SEQ", strategy =