Skip to content

Tag: spring

JPA Converter with contains query

I’m having some trouble with a particular query in my Spring Boot application. I’m using Spring’s built-in text encryption in order to encrypt text in my database I have an entity called BookRecord And a title encryption converter which looks like this I’m trying to search the database…

Hibernate Join between 2 tables with foreign key

Im trying to get a list with results from join with two tables, but always get error. What i want is List with person and job name Error Cannot invoke “org.hibernate.hql.internal.ast.tree.FromElement.setAllPropertyFetch(boolean)” because “fromElement” is null My tables Person int id te…

Why my trigger is not working with Hibernate?

I have a Java spring boot project and I use Hibernate in this project. I have a void deleteAll(List<Long> idList) method and its query is @Query(value = “DELETE c FROM Course c WHERE c.id in :idList”, nativeQuery = true). I want to use a trigger after every delete operation. I created a trig…

Java find Object which not containing in List of object

I wondering is there any way to filter object array with another object array. Its is to hard to explain but ill try my best this is my first entity this is second entity i have two list of this each entities Like this And I need to get MDynamicFieldTypes list which not containing in dynamicFields->type Li…