How would I get multiple results from a MySQL table? [closed]

Say I have 2 columns, the first one is ID and the second one is colour. How would I search for a specific colour and get all of the id’s that are in the same row as the colour? How would I turn the …

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 )…

How to create hibernate request with localdate

I have a user who has an expiration date (dateTime), I need to display all users who have not expired yet. Tried different options with DATA (), or as an example – @Query (name = “SELECT u FROM …

while sending parameters to @Query function if i give like ?1 it is trying to excute like ? only

when i try send:- @Query(value = “SELECT * FROM labels where personal_ic_id=?1 and content like ‘%2%'”,nativeQuery = true) List searchByLabels(String personalIcId, String key);…

Running Acrarium by docker-compose.yaml causes HikariPool-1 – Exception during pool initialization

I’m trying to run Acrarium on my local Debian 10 machine – just to test it – by running the docker-compose up command with this compose file: version: ‘3.7’ services: database: image: mysql …

Duplicates in Output Java Spring Boot JPA

I’m working on an application with following Entities and code: @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS) public class Clip { @Id @GeneratedValue(strategy = GenerationType.AUTO) …

Register form only works if user is already logged in

I created a Spring Boot web application, and it is connected to a local MySQL database. I have a template called “login.html” which has a login form, as well as a register form in it. This …

Connecting Java with a localhost, problem with my code [closed]

to make it short, the next code import java.sql.*; public class Prueba{` public static String user=”Boss”; public static String pass=”123456″; public static …

why if i make JTable take data from database delete the first row?

I’m trying to make a Table take the data where I make condition a delete from … to … , the data returns one row thinner, maybe one row deleted? my code: JScrollPane scrollPane_9 = new JScrollPane(…

The dreaded Java SpringBoot app not connecting to MySQL with Docker-compose java.net.ConnectException: Connection refused

The dreaded Java SpringBoot app not connecting to MySQL with Docker-compose java.net.ConnectException: Connection refused Hi Folks, I have been struggling with the following issue – the dreaded Java …