1:n disable constraints for the n-side?

The Problem I have a 1:n relation, but the n side shouldnt rely on constraints. So i actually wanna insert a EntityPojo via its future id, when its not saved yet ( Lets ignore that its a bad practice )…

SQL query is only returning one entry, when it should be returning several

I am creating a book tagging system and I am trying to call all the books with the same tag. My query is only turning up the first book, and not any of the following books with the same tag. Here is …

How to add multiline Strings in Java?

How to make long queries more readable? For example I have this one: String query = “SELECT CASE WHEN EXISTS (SELECT * FROM users WHERE username = ‘username’ AND user_password = crypt(‘password’, …

Liquibase bidirectional relationships changelog order

I’ve faced a problem when implementing liquibase in an existing project. So we have two entities: Company: @Entity @Table(name = “company”) @EqualsAndHashCode(of = {}, callSuper = true) @…

JOOQ materialized views

is it possible to create materialized views using the JOOQ builder? Something like this DSL.createMaterializedView().execute()

Is there a way to query ltrees in JOOQ?

Is there any sort of extension that would allow me to use Postgres ltrees in JOOQ without having to use raw SQL? Any way to make one myself maybe?

In Jooq, how to make the “delete” statement return the deleted records?

In my project, there are 2 tables, orders and order_payments. The latter is a join table with 2 columns, order_id and payment_id. I didn’t use FK for efficiency sake. When I delete some orders from …

JPA SQL Result Mapping

my code is mapping query result to DTO using Sql Result Mapping and create list with these dtos but in my database id can be null and it gives me trouble in mapping. That’s why I don’t want to use it …

JOOQ – inline Converter not being applied

In my build.gradle I use a converter in my forcedTypes. This works fine where i need it. forcedType { userType = ‘java.util.List’ converter =…

Case insesitive query with Springboot CRUD Repository

Values in Room_Entity table is hardcoded and Room_Status values are in uppercase . I want my search to be case insensitive. Here is my query. I am using upper but getting error @Query(value = “…