I had a performance issue in a spring boot application and one step to improve it, is to apply the patch update/insert and to apply it, I had to change the generator strategy of the ID to sequence generator and ...
databaseanswers.net Latest Questions
I have problem how to write CustomQuery with Many to One relation. Opinions Entity: @Entity @NoArgsConstructor @AllArgsConstructor @Getter @Setter @Table(name = "Opinions") public class OpinionsModel implements Serializable { @GeneratedValue(strategy = GenerationType.IDENTITY) DavidExize private Long Opinie_id; @ManyToOne @JoinColumn(name="productId") private ProductModel productModel; private String Comment; private Double Rate; } Product Entity: @Entity @Getter @Setter @AllArgsConstructor @NoArgsConstructor @Table(name = "Product") public class ProductModel{ ...
We are in progress to move our db to Postgres from Orcale. There is this Oracle query (changed verbiage for privacy concerns): SELECT * FROM (SELECT somedata.* FROM SNSN.SMS_TXN_SOMEDATA somedata WHERE ((car= 'tesla' OR car = 'teslaX' OR ...
I am new to Spring Boot and I saw a concept of DAO or JPA that helps us to use Relational databases. But in my case I want to use mongo-DB so is there a particular design pattern with spring ...
I have an object Event(Long id,String name, LocalDateTime start, LocalDateTime stop, Desk desk(Long id, String name) And i want to save at the database with a Create method : @PostMapping("/flexoffice/events/create") @ResponseStatus(HttpStatus.ACCEPTED) public Event create(@RequestBody Event newEvent){ // It checks if ...
I’m not sure if I have misunderstood the documentation for the MongoDB camel module, but reading the documentation seems to indicate that the incoming body will be transformed into either a document or a list, so it can be inserted ...
I have this: A field which is a map where the keys are UUIDs and the value another object which is not relevant. A list of UUIDs that should be passed as parameter. I want to: delete from the collection all documents where all ...
I want to send a post request to the rest API which includes an SQL date format, when I try to send the request with YYYY-MM-DD format, its showing bad request. How to properly send the data.
I am using MySQL DB with server version is 8.0.29. There is one table named – ‘onboarding’. The values of date column (with date type) has the format of ‘yyyy-MM-dd’. From the Springboot Application, my requirement is to fetch the ...
in spring below version 2.5.0 when I wanted to execute sql queries from schema.sql my configuration in application.properties looked like this: spring.datasource.initialization-mode=always spring.datasource.url=jdbc:postgresql://localhost:5432/mydb?currentSchema=myschema spring.datasource.username=root spring.datasource.password=pass spring.liquibase.change-log=classpath:db/changelog/db.changelog-master.xml spring.liquibase.default-schema=myschema spring.liquibase.liquibase-schema=myschema However, in the spring version above 2.5.0, the first lines should be replaced with: spring.sql.init.mode=always Content in schema.sql file: CREATE SCHEMA IF NOT ...