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
Tag: hibernate
I have created a spring boot with DTO, Entity and also not able to store it
I have created a spring boot with DTO, Entity and also generating entity from dto and vice versa but the data is not getting stored in the Postgres sql when i am trying to get the data its is showing null but creation is happing First is the controller class Now the StudentDetailDto class now the StudenDto class now the
How to map column with type BIT(24) in PostgreSQL with Hibernate
I have a table with a column which type is a bit (24). I tried to use String and when I try to get this object it maps well, but when I try to save it, Hibernate throws Exception: org.postgresql.util.PSQLException: ERROR: column is of type bit but expression is of type character varying I know that if it’s a bit(1)
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
How to get Page as result in Querydsl query with fetch or fetchResults properly?
Hi what i trying to achieve here is, i want to submit Pageable data into QueryDsl query and get the result as Page, how can i do it properly? here is what i do until now : here is my controller : in my controller i submit StockViewByProductCodesDto which is looked like this : and here is my service :
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