Skip to content

Tag: hibernate

Understanding JPA sequence generator

I’m using spring data JPA’s sequence generator to assign primary keys to entities. Model contains: The corresponding sequence definition(for SQL Server DB): Since I wanted to start the ids from 100 instead of 1, so I updated the sql script to And then I encountered the problem as mentioned here. I…

Batch insert entities to DB (Quarkus, Hibernate)

First off: I’m not used to Quarkus or Hibernate (I’m pretty much all .net) Problem: My service receives a list of ~10k (Would guess thats the most common number). This comes via a resource endpoint, and it takes +10s for it to complete, Far to long. And the service is unresponsive. The statusDao.C…

What am I doing wrong in this one to one bi-directional mapping?

I have two classes: Person and PersonDetail Person: PersonDetail I have set up a bi-directional one-to-one mapping between these classes. I am trying to save a person and that person’s details and then I am trying to fetch the person using the person’s details. The code for that is: My test is fai…