Category "hibernate"

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

It's seems hibernate ignores allocationSize

I'm trying different hibernate id generation strategies and I've noticed that it seems like hibernate ignores allocationSize. I have the following entity class:

Getting org.hibernate.HibernateException - Unable to get the default Bean Validation factory

I have a maven project throwing Bean Validation factory error, added below dependencies still issue has not got resolved. Using java 11. <dependency>

Hibernate - Map View to Entity - view is not mapped [SELECT la FROM ListAgent la]

In an effort to power an autocomplete, I resolved to map a PostgreSQL view. I followed a tutorial for this. It seems that it does not work at all : I've always

Inconsistency between postgres and hibernate

Inconsistency between hibernate and postres. Consider we have table student having 2 columns id(Primary Key) and name. Perform the following concurrent query on

JPA cascading delete fails with custom delete method

I ran into an error with custom delete method in spring data jpa. Basically there's a bag which contains items, and when deleting the bag, all the items in it s