Basically, I’m kinda exhausted while thinking about the best possible way to structure my database for a recipe app I have planned and could need some help/ideas. The goal is to make a recipe app including multiple languages(translated recipes) and ...
databaseanswers.net Latest Questions
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 ...
I want to embed date information in the primary key, for a table that will be partitioned (monthly) in a PostgreSQL database. This should in theory speed up the process on finding out in which partition to look for the ...
package sth.hibernate; import org.hibernate.cfg.Configuration; import org.hibernate.Session; import org.hibernate.SessionFactory; import sth.hibernate.entitty.Users; public class App { public static void main(String[] args) { SessionFactory factory = new Configuration() ...
I have vendor table where manager is a foreign key. I’m trying to query for name of the manager, my query is like below. `from TNewVendor t where t.archive=false and t.manager.name like "s"`. With this query I’m getting only those records where ...
I am trying to execute a time_bucket_gapfill(:duration, time, :startTime, :endTime) on a table created with spring data, but the execution of the query throws org.postgresql.util.PSQLException: ERROR: syntax error at or near "$2". Table is: @Entity public class ReadingParameter {
im created entities and want to create a embedded h2 database with tables and columns from this entities. Thats my application.yml file: intellij logs the correct sql statements from ...
I’m saving an Instant field which is mapped with hibernate (5.5)/jpa (2.2) as TIMESTAMPTZ to Postgres, then on tests we need to load it and compare them. With Java 17. When saved it was: expiresAt=2022-10-11T08:06:35.702666317Z when I query the data: expiresAt=2022-10-11T08:06:35.702666Z @Setter(AccessLevel.NONE) @Column(columnDefinition = ...
I am currently using springboot and use spring data jpa, postgresql. I am trying to create table using hibernate in postgresql. I think i don’t use any database keywords on my table. Can anyone help me? This is my Product class: @Getter @Setter @Builder @NoArgsConstructor @AllArgsConstructor @Table(name ...
In my Spring Boot application using Postgresql I have the following User entity which contains a payment_methods field which is a List of the Method class @Entity @Table(name="users") public class User { DavidExize @GeneratedValue(strategy = ...