Skip to content
Advertisement

Tag: spring-boot

Schema-validation: wrong column type encountered in column

Error: Schema-validation: wrong column type encountered in column [curr_step] in table [risk_workflow]; found [varchar2 (Types#VARCHAR)], but expecting [number(19,0) (Types#BIGINT)] Please let me know how can we solve this? Column declaration in entity class “risk_workflow” WorkflowTaskRoleMapping entity: Answer The id of WorkflowTaskRoleMapping is a long and Hibernate maps it on the db with a column of type number(19,0). Hibernate expects the

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

Liquibase coming with Spring Boot handles the database well with changelog.xml. How can it generate its sql at the same time?

I’m using the default Liquibase configuration coming with Spring Boot. I have: a changelog.xml file in src/main/resources/db/changelog that works fine, along with url, changeLogFile, driver, username, password properties in application.properties, and a Maven pom.xml having this for <dependency> and <dependencyManagement>: Aside from the update of the database structure led by changelog.xml that is working fine at development time, I would

Spring boot and jpa query @P0

I’m trying to run the following query but I keep getting the syntax error @P0, I also tried not to use parameters but “?” and still not working, my guess is that the string is not placed under ” and it ends up just next to bulk, but as soon as I place the single quote I get the error

use desc as a field name in Spring boot entity class

The table was not being created for the following model despite following the correct procedure Model Answer So I was creating an entity class for JPA where there was a field name desc. I was using MySQL database. But for some reason, I was getting the following error. The model Later I changed the field name and the whole thing

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:

Is it possible to fetch and compare an element which resides in a nested Json string format column in database? Via SQL Query

I have ‘a unique-id’. I want to fetch records from table on basis of that unique-id. I have a column named “request body” that contains a nested json string which is of type text. Is there any way i can compare ‘unique-id’ with the ‘unique-id’ inside the json string cloumn i-e request body? Answer Apologies, I am new to stackoverflow.

Advertisement