Im trying to setup a basic CRUD app from this tutorial https://www.javaguides.net/2018/11/spring-mvc-5-spring-data-jpa-hibernate-jsp-mysql-tutorial.ht ...
Im trying to setup a basic CRUD app from this tutorial https://www.javaguides.net/2018/11/spring-mvc-5-spring-data-jpa-hibernate-jsp-mysql-tutorial.ht ...
Here is the main table: And the table which is ElementCollection in my case: When I do a query with a join fetch, I get Group with all its Membe ...
i am trying to get the records from the database using spring data jpa Speicification API. here i need to put a condition for "In" clause for status c ...
I want my spring boot repository tests to not use the data.sql file defined in the src/main/resources when executing tests. I'm running spring boot ve ...
I have below collection and embedded documents And ContactDetails.java looks like below: StateDetails look like below: And AddressDetails loo ...
I'm saving 2 entries to the same table 1 by 1 with JPA and Hibernate under some Transactional flow chain. the entries are not committed until the tra ...
I am unable to solve this error Unsatisfied dependency" expressed through field 'employeeRepository' I added @EntityScan("base package") and al ...
In a database, an author already contains one book. I create a new book for an author and want to save it. But when the function addBook is called ...
I am using MSSQL server as DB and the method in the repository layer of my spring boot project: here cNoList may contain only 0 or some values. i w ...
During my unit tests using Spock and Testcontainers, the JpaRepository is not functioning properly and is not being wired correctly. This issue persis ...
I am getting the error failed to lazily initialize a collection of role could not initialize proxy - no Session when i am trying to retrieve a list fr ...
In below I am creating EntityManagerfactory object and EntityManager object Below is build.gradle file content Below is gradle.properties file ...
I'm struggling with this problem. I have table "Cities" which has foreign key to table "Countries" with country_id referenced to country from which is ...
I have implemented the Spring data JPA batch insert and it's working perfectly fine. Also I have seen very good improvement in performance. For this i ...
Below aggregation always produces _id that looks like this. "_id": { "timestamp": 1675104059, "date": "2023-01-30T18:40:59.000+00:00" }, and I need l ...
I have a problem regarding my implementation of a weak entity type. (Note, if that's important: I'm using H2 as my database) Here is my datamodel: ...
Recently I switched into Spring Data JPA and I am wondering how is it possible to save a new object into the database with some default values. In my ...
I am using Spring Data JPA to get data from a MySQL database. I have this function adnotated with @Query in a repository Spring generates the SQL a ...
How to properly delete a record from a database in one query. For example, when an entity uses the primary key of the parent entity using the @MapsId ...
I have a query like below that doesn't work. It throws IndexOutOfBoundsException: Index: 0, Size: 0 (sorry I can't post the whole stacktrace as it i ...