I am using Spring Boot and Spring Batch and JPA to load data from One database into another. In a single batch Job I've created 10 steps to run steps in sequenc
I am unable to bind foreign_key baz_id to Baz on a POST call, it fails with a instantiation error trying to store a bar POST http://localhost/foo/api/v1/bars {
What if I have my native query (with PostgreSQL) in a more "complex" way, which I need to GROUP the data in order to apply an ORDER BY clause? Well, doing so wi
Trying to figure out how to store a list of enums in a single table column. I started with a String and it worked. I'll show only the relevant parts of the code
Enabling @Version on table Customer when running the tests below @Test public void actionsTest1 () throws InterruptedException { CustomerState t = customerS
I am doing a rest service with java spring boot. The tables are created correctly in the database and locally test everything works correctly, but when I mount
I encountered a very interesting issue. I want to create an UPDATE statement NamedQuery for my class (I know this is a bit hacky). The weird thing is if I use p
I am currently creating a small project to mimic simple bank transactions. Currently there are two types of transactions. Request transaction Transaction is can
I have a native Query that return a list of objects, i need to pass an array as parameter to the function getAllUsers. @Repository public interface UserReposito
I am using a Spring-Boot (2.3.3) application with Hibernate (5.4.20) and JPA repository on MySql DB, and I have a Bi-directional relationship between an entity:
In the code I do not even use entityManagerFactory. I extend JPARepository and for creating the tables I have entities annotated with @Entity (using javax.persi
We are currently using cockroach DB, but this doesn't support returning X records at a time presumably due to lack of cursor support. This means that when tryin
I want to use the spring data repositories in my quarkus application with jpa. As long as I use the default datasource and no named persistence unit, I'm able t
im running Checkmarx on my code and im getting an sql injection vulnerability. this is the simplified method im using public String assignRole(String userId, St
I'm trying to create a Specification for filtering a table. This table has 2 @ManyToOne relationships (that can be null) and I'd like to apply the filter inside
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
I have a JPA Entity (Terminal) which uses an AttributeConverter to convert a Database String into a list of Objects (ProgrmRegistration). The converter just us
So I'm trying to create a pharmacy database that, among other things, keeps track of drug-to-drug interactions. I have a Drug entity with various members and as
I used the ElementCollection annotation on a List object, @ElementCollection(fetch = FetchType.EAGER) @CollectionTable( name = "a", joinC
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