Skip to content
Advertisement

Tag: spring-data-jpa

how do i save a new student that contains entities, but don’t create these entities because they already exist in the database?

I want to save a student and a student has a TargetAudience object as an attribute. These target audiences are allready hardcoded in my database. (targetaudience = campus + major). Now when i post like this: it doesnt work because everythime it creates a new object for the campus and because i use name as a primary key it throws

Deadlock when we we have dependent entities in hibernate and try to update table using multiple threads in Vertica

I have two java classes. Father.java and Children.java I receive the Deadlock X exception if several threads visit the same table (entity father) to updates with distinct row entries, even though the records are different. Is there any way to fix why the entire table locks up instead than just one row? Even though I haven’t updated or added anything

JPA Subquery fails

Does anyone know why it fails? It does not give syntax problems but it gives me the error “missing expression (ORA-00936)” The problem seems to be in :user IN uc.users Answer I think the last bit is incorrect. This should work: So, the whole query becomes:

How to create LinkedList of JPA entities

I have a scenario where I need to create an entity which has references to list of predecessors and list of successors. when a request is received, I need to create entity like below: Request: My new entity “task2” should now be created as below in DB. While saving task2 with previous as task1 and next as task3, I also

Advertisement