Category "hibernate"

Java ORM vs multiple entities

I have a class Health Check - as part of the class I record how many parasites are seen (enum NONE, SOME, MANY) and also the location of the parasites (enum HEA

Exceptions in criteria API after changed hibernate.criteria.literal_handling_mode

I have a software which used java, ejb, hibernate and wicket. After I changed hibernate.criteria.literal_handling_mode on "bind" I get some exceptions in criter

Lazy Load Exception in a foreach loop with try/catch inside

I have the following code: The User is a Hibernate domain. for(User user : users) { try { function() //log the user

Some table rows are not returned by hibernate native query

I'm having a big problem that a few rows of the table are not returning by the native query of hibernate (Spring Data), although if I put the same query in the

Guice-persist: inconsistent data from EntityManagers

I have a problem with the persistence in a java web application. We use Ninjaframework (6.8.1) which uses Guice as dependency injection framework and for persis

Spring boot mapsId

Hi I using spring boot jpa and I need to use mapsid. There are not so much information about that and I wonder if anyone can help me understand how to use maybe

JoinTable not generated with @OrderColumn annotation

I think that must work, but seems not. I have an entity, let's call it 'team' that has a list of members where the order is important. @Table(name = "teams") pu

Proper mapping ( JPA ) composite key

For example i have entities @Entity public class A{ @Id Long Id; ... } @Entity public class B{ @Id Long Id; ... } @Entity @IdClass(ABId.class). public class AB{

EntityManager closed when executing queries on different threads

I am trying to execute a couple of queries on different threads. There are 2 top level queries each executing on different tables at runtime. For executing the

SQL inner join with top to JPPQL

I have this SQL: SELECT b.NAME, b.ID, hc1.CATCH_DATE, hc1.id FROM BIRD b INNER JOIN HEALTH_CHECK hc1 ON hc1.BIRD_ID = b.ID INNER JOIN (

Hibernate + spring multi tenancy wrong schema selected

I’m using Jhipster (Gradle + React) for one of my project, and recently, I want to add Multi-tenancy support to the whole application (tenant will be the

JPA relationship for existing table and parent table

I have a table which has a foreign key relationship with an existing table and its child table. The parent table exists before the child table as is populated

Update foreign key in Spring Boot with a POST request

I am trying to make a put request using Postman with Spring Boot. The idea is to give the subscription object a foreign key value with a put request or post. I

JPA/Hibernate @GenericGenerator throws StackOverFlow on persisting entity

I have implemented two entities (Department and Employee) with custom ID generator for Employee, and has a unidirectional one-to-many relationship as shown belo

Get user data between two date in Hibernate Java

i have an hibernate entity called user.I want to get the list of users who are between two dates a date interval. Example, I have a date D1 and I want to know t

Is there "CASCADE ON UPDATE" functionality in Spring Boot for DB level?

How can I create CASCADE ON UPDATE funcionality Database level using Hibernate annotations? Similar to "@OnDelete(action = OnDeleteAction.CASCADE)". I don't mea

Is there a way to return collection instead of entity in @Repository's @Query

I have a query: @Query( value = "select name, age, now() from received.scheme ;", nativeQuery = true ) public {???} selectData() I cannot create or r

file from one node to another node?

I would like to add a database to it so that the information is stored.

Grails 4 Mapping exception - org.grails.datastore.mapping.model.IllegalMappingException: Non-existent mapping property

I am upgrading from grails 2.5.4 to 4 and getting the following error in grails 4 : Failed to instantiate [org.grails.orm.hibernate.HibernateDatastore]: Constru

How can I validate two fields like password and confirm password in Struts 2?

I am doing web application in that I want to validate two fields in the JSP form. In registration filed I have so many fields. In that I want to validate passwo