hibernate Questions

3

Solved

I've recently started to learn spring boot, data jpa. As I can see from this, the spring boot data jpa starter uses jakarta.persistence-api instead of javax.persistence-api: <artifactId>spr...
Cheka asked 1/2, 2020 at 23:0

14

Solved

I've been having an annoying exception a lot lately, and after some research on Google and this forum I still haven't found an answer that could solve my problem. Here's the thing - sometimes, I g...
Ani asked 24/7, 2011 at 22:22

5

i get this error: last_insert_id is not a recognized function name. when I try to send data to the server to be saved in a SqlServer 2008 database. It was working fine but suddenly I am having...
Bagman asked 5/9, 2012 at 4:42

5

Solved

I am currently using criteria to retrieve the details of a user, but when trying to query the details object with the right user, I get a ClassCastException. My Criteria Code; Criteria criteria ...
Schriever asked 24/12, 2010 at 8:45

13

Is there a Hibernate dialect for MySQL 8? Or should I use the org.hibernate.dialect.MySQL57Dialect that ships with Hibernate? I'm using hibernate 5.2.16
Ginn asked 14/5, 2018 at 2:53

8

Solved

I am using 2nd level cache and query cache. May I know how to programmatically clear all caches ?
Cowgirl asked 17/3, 2010 at 9:31

4

Solved

Is there a setting in hibernate to ignore null values of properties when saving a hibernate object? NOTE In my case I am de-serializing JSON to a Hibernate Pojo via Jackson. The JSON only conta...
Rhumb asked 22/9, 2011 at 15:41

4

Stuck on the same problem Is there any method to ignore null values when updating the database in Hibernate? Whenever you call update(); of Session, it will also update the null values found in th...
Blotchy asked 25/4, 2014 at 6:18

3

Solved

The hibernate best practices states that many-to-many associations are rare and should be avoided. Do not use exotic association mappings: Practical test cases for real many-to-many associati...
Koball asked 3/9, 2013 at 13:58

1

I am getting below exception for a jpa query org.springframework.orm.jpa.JpaSystemException: Unknown wrap conversion requested: java.util.ArrayList to java.lang.string: 'org.hibernate.type.descript...
Tenorrhaphy asked 14/6, 2023 at 9:14

5

Solved

This post is in continuation of JPA How to get the value from database after persist When I execute the following I am getting following exception, how can I resolve this? Not allowed to create t...
Famed asked 25/7, 2013 at 14:21

8

Entity looks like this: @Getter @Setter @Entity public class Application { @Id private Long id; @Enumerated(EnumType.STRING) private ApplicationStatus status; } Code works this way: public inte...
Trawick asked 9/6, 2017 at 14:28

2

I have a customer and a customer info entity in my spring boot project. They have an one to many relationship. @Data @Builder @Entity @NoArgsConstructor @AllArgsConstructor @Table(name = "cust...

7

Solved

I need to consume a rather large amounts of data from a daily CSV file. The CSV contains around 120K records. This is slowing to a crawl when using hibernate. Basically, it seems hibernate is doing...
Hinds asked 8/9, 2011 at 14:14

3

Solved

I have an entity Rental with the following userId field: @Column(name = "user_id", updatable = false, nullable = false) private UUID userId; I also have a JpaRepository for it: public interface...
Subscription asked 31/1, 2020 at 9:59

7

Solved

I'm currently in the process of enabling UTF-8 characters in some tables of a large database. These tables are already of MS-SQL type NVARCHAR. Additionally, I have several fields using VARCHAR a...
Prevention asked 8/3, 2011 at 19:28

6

I am trying to build 1 hybrid test project using spring + hibernate. After deploying... I am getting frustrated with this error.. and searched in google but still not getting it working... Caused...
Kinna asked 1/6, 2012 at 7:29

3

Solved

I'm stumped - I haven't used Hibernate in several years and then, never with Spring Boot. Spring Boot but never with Hibernate or JPA. So i'm trying to figure out how to get this to work for my job...
Sharkey asked 26/6, 2022 at 13:17

6

I want to configure hibernate-jpamodelgen into Maven pom.xml. I tried this: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0....
Sharl asked 31/7, 2019 at 12:36

4

Solved

I am trying to create or update user with Hibernate 5 and it throws following exception: org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl@779de014 is closed I'm using the followi...
Quadrangle asked 1/3, 2017 at 18:1

13

Solved

I'm trying to associate a list of function (whom Embeddable) within my Employee Entity and H2 seems unhappy with this saying that it expected an "identifier" Caused by: org.h2.jdbc.JdbcSQLExcept...
Flyblow asked 13/10, 2017 at 20:15

4

Technology stack: Oracle database 11.2.0.2, Java 1.6, Hibernate 3.6.6.Final. I am new to hibernate, apologize if this is trivial. The following code was supposed to put some optimization: Transa...
Laurentium asked 2/2, 2017 at 12:25

7

I have a Criteria with: Criteria criteria= session.createCriteria(Libro.class).addOrder( Order.asc("ID") ); However, when I want to get the rowcount fail: criteria.setProjection(Projections.row...
Conceptualism asked 3/3, 2010 at 10:4

2

Solved

Problem: entityManager.unwrap(SessionImplementor.class) cause no transactional entitymanager available exception. Code: @Component public class HibernateEventWiring { @Autowired private ViewLi...
Deration asked 19/12, 2014 at 17:3

2

Solved

Following java doc @Where Where clause to add to the element Entity or target entity of a collection. The clause is written in SQL. A common use case here is for soft-deletes. @WhereJoinTable W...
Sideburns asked 4/8, 2017 at 10:7

© 2022 - 2024 — McMap. All rights reserved.