Category "hibernate"

java.lang.NoSuchMethodError: 'java.lang.String org.hibernate.search.engine.Version.versionString()'

I'm having a problem trying to upgrade hibernate search from v5 to 6.0. I had it working previously but now I'm getting the following error no matter what I do

How Hibernate process '?' [duplicate]

I'm new in Hibernate. I can't understand how Hibernate process ? in Restrictions.sqlRestriction() method. For example, there is a sample from

How can we test for the N+1 problem in JPA/Hibernate?

I have a N+1 problem, and I’d like to write some kind of automated regression test because it impacts performance very much. I thought about spying the E

How to make DataJpaTest flush save automatically?

I have an Employee entity with the following column: @Entity class Employee { @Column(name = "first_name", length = 14) private String firstName; and I hav

Missing table [rev_info] after bump liquibase version, spring data envers

I have problem with my project after bump liquibase version to 4.9.1. There is error: BeanCreationException: Error creating bean with name 'entityManagerFactor

problem with postgresql sequence and hibernate

I often read this site, but this is the first time I write, hope I won't make mistakes and apologize for my bad english. I get to the point: I have to develop c

Hibernate createNativeQuery returns duplicate rows

I have 2 database tables Customer and Items with 1 -> many relation. To fetch data from database i am using the following query. select customer.id, cust

Hibernate 5 migration Issue with Multilevel Joined table Inheritance with Hibernate 5.4 DiscriminatorColumn

I am working on migrating a legacy Hibernate project from version 4.1 to 5.4. The code has Multilevel Joined table inheritance using a dedicated DiscriminatorCo

Set of String is not acting normal in Spring JPA Projection Interface

I am using Projection Interface to return a partial view of an Entity, and the partial view contains a Set of String. I expect the Set works as normal but its n

How to check if token expired in java?

I have user which have: id, username,password, tokenExpires which is Date. When i generate token i generate a string, how to check if token is not expired?

org.hibernate.internal.ExceptionMapperStandardImpl.mapManagedFlushFailure HHH000346: Error during managed flush

I have a server mistake: > ERROR [http-nio-8080-exec-5] > org.hibernate.internal.ExceptionMapperStandardImpl.mapManagedFlushFailure > HHH000346: Error

Java Hibernate Different Behavior between starting jar from console and explorer with double click

In my JavaFx project I use Hibernate to connect to a local Postgresql database. In Intellij the project runs and the connection works. Also when I start the for

how to make findby with composite key in spring data - jpa -hibernate ? @EmbeddedId

@Embeddable public class AccountTransactionId implements Serializable { private String trxDate; private String acctNo; private int trxNo; } @Entity

Unknown initial character set index '255' received from server

During attempt to create HibernateSession application fails with exception: Caused by: java.sql.SQLException: Unknown initial character set index '255' re

Hibernate doesn't create tables automatically

I have Maven project with Hibernate/Spring/MySQL. I have basic entity and I want Hibernate to create tables automatically, but Hibernate doesn't create any tabl

Spring data: DeleteAll and Insert in same transaction

I am trying to achieve below native query logic using hibernate (Spring JPA). But save(Iterable) throws exception and rollback the entire transaction if one of

Is it a good or bad convention to update entity / row without calling save() in hibernate / spring-jpa?

Recently I found it not necessary to call repository.save() if within a @Transactional block. Hibernate / Spring-JPA will update row automatically when exiting

MappingException (Hibernate)

"Could not get constructor for org.hibernate.persister.entity.SingleTableEntityPersister " I am not using any maven or such tools and manually add and reference

Hibernate / Spring Data - get executed sql queries count

I'm working on presentation in which I would like to show difference in number of executed sql queries between deleteByPost() method with and without custom que

Exception in thread "main" java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException getting this Excdption

I am trying a simple program with hibernate but while retrieving data from db i am getting this error. But the insertion is working fine. I have provided the