Skip to content
Advertisement

Tag: java

Boolean values are not mapping properly when using multiset in JOOQ

The ProductCategoryDto class : CategoryAttribute class : The query with needs to be executed is The output for the query is Database create statements: Code generation configuration in pom.xml: I am getting all the boolean fields as null while they are not null in Actual data. How to map the boolean fields properly so that there will be no null

SQL Joins not working correctly when no data present

I’ve got the following code, where I build a tag from an entity Each tag has an id, name, description and how many questions it has, how many it has in a day, and how many it has in a week. The problem is, I can’t seem to display tags that have no questions tied to them, and also if

Query did not return a unique result

This is the query I have written: This is the output I am getting from the database: id versions 101 0.0 101 1.0 101 2.0 101 3.0 In my application, I am storing this result in but it gives an error saying “query did not return a unique result” How can I store this result? which data structure could I

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

Create relationship between 2 tables JPA

Need help with setting up table relationships. So, there are 2 entities – Section and Period. 1 Section has many Period, but 1 Period do not belongs to any specific Section. I implemented this relationship as follows: created an additional table SectionCodes with an external key on Section (more in diagram) Section class: SectionPeriod: This works fine, but there is

Integrity constraint violation: unique constraint or index violation HSQLDB

For example if I add new Department(new BigInteger(“50”), “ODD”, “SPB”), all work, it values are insert into database. But if I want again insert for example new Department(new BigInteger(“50”), “ODDMOD”, “SPBMOD”), appear java.sql.SQLIntegrityConstraintViolationException: integrity constraint violation: unique constraint or index violation; SYS_PK_10092 table: DEPARTMENT. I know that can not insert values with the same primary key, but how can update

Java Sqlite how to print a.rowname

I asked myself how I print a.rowname in Java with jbdc sqlite. Or did I take the wrong solution to fetch all the Selected data? I tried this: And I get this error: In Python it works kind of like this. I can later just get the Selected data from the array: Answer You do not select a.spieler try: Update

Advertisement