Skip to content
Advertisement

Tag: hibernate

Records appear to be locked between sequential database operations (Spring Data, Hibernate)

I’m experiencing what seems to be a record lock between sequential (not concurrent) database operations, which I can’t explain. Situation Method saveRegistrationToken is called from a REST controller. I test the calls to the method via Postman (HTTP client); the method is not called anywhere else, this is the only operation executed. The method execution is supposed to behave as

How to solve this Problem: Error creating bean?

I am getting the following error and I am getting frustrated btw. Please help. This is the Error I am getting: This is my User Entity: This is my UserRepository: And this is my UserController: How can I solve this problem? Let me know if you need more. Answer You should remove prefix: “users_” for fields, because in spring-data underscore

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 using a “contains” on the title, however because the title is encrypted

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 text name int job_id (foreign key with table JOB(id)) Job int id text name Entities DAO Answer To be able

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 trigger in mysql and it works when I

JPA Hibernate Annotation Issue

I have three Entities i’m modeling and am having issues with the associated annotations. I basically have a class that I intend on returning to the caller, a nested listed of Project’s and the Project can contain a nested list of Endpoint’s. It’s a top-level has-a one-to-many, then the nested one-to-many has two one-to-many’s. I’ve played with @JoinColumn annotations, i’ve

Hibernate join columns error: Unable to find column with logical name

I am still pretty much a hibernate newb. I am trying to solve an issue when I start my server: Entities as below: SQL Files: Error happened after adding two new columns stage and organization_id in sep_pr_req_att which is suppose to join to ProcessFlow entity/ spe_workflow table. I am referring to an existing similar table structure on the mapping. I

Advertisement