Issue I have a problem with date format in JSON response generated in REST project (SpringBoot+Hibernate). When I call function I got JSON like this: “rezerwacjaDataOd”: 1535580000000, “rezerwacjaDataDo”: 1535839200000, “rezerwacjaGodzOd”: “14:00:00”, “rezerwacjaGodzDo”: “12:00:00” my entity: private Date rezerwacjaDataOd; private Date
Continue readingTag: hibernate
[SOLVED] Spring/Hibernate app in docker doesn't remove columns
Issue I am new to docker and it is easy to get confused about some things. Here is my question. I am working on my Spring Boot app and was creating entities for DB. I found out that when I
Continue reading[SOLVED] How do I filter data in a restful way using Spring?
Issue As the title says. I basically would love to do requests like /api/todos/?completed=eq.true&created_at=lt.1486462109399 Is there any ready spring way of achieving such? Something akin to the Page/Pageable mechanism would be great. If there is none I think I could
Continue reading[SOLVED] Set up Spring Boot Data and Querydsl: Not generating metamodels (using Intellij IDEA)
Issue I’m trying to set up a project using Querydsl. I have tried to follow the official docs v5.0.0 and v4.4.0 but the metamodels do not get generated (except once, then I changed something, rebuilt, they disappeared, I changed back,
Continue reading[SOLVED] I upgraded to Hibernate 6.0 and now I get Unknown Entity errors
Issue Apologies for abusing the format, I’m not really asking a question here but I sure wish this would have shown up when I started banging my head against this wall two weeks ago. I’ve inherited several large Java projects,
Continue reading[SOLVED] Hibernate: Cannot find by UUID
Issue Im trying to use UUID’s as ids for my database but I simply do not get it working. First attempt was: @Id @GeneratedValue(generator = "hibernate-uuid") @GenericGenerator(name = "uuid", strategy = "uuid4") private UUID id; but this is generating some
Continue reading[SOLVED] Hibernate JPA "findAll()" Returning only One Row (Spring Boot 2.3.7)
Issue I am trying to fetch some data from a table and perform some operations on it. But somehow it just returns one row over and over again. Here’s my Repository class: package com.gtt.wcas.device.db.repository; import org.springframework.data.repository.PagingAndSortingRepository; import org.springframework.stereotype.Repository; import com.gtt.wcas.device.db.jpa.DeviceDetails;
Continue reading[SOLVED] Spring-Data-JPA Hibernate: how to override/update a detached entity with the same ID?
Issue I have to override/update a set of existing entities mapped by a cascade @OneToMany relationship from another class. I would like to avoid having to previously load the existing entities and then save them for making them attached to
Continue reading[SOLVED] Dynamic HQL query using hql expressions rather than Criteria?
Issue I am trying to write a partially dynamic HQL query without resorting to the Criteria API for various reasons. I wanted to know if there is an easy way to short circuit a where restriction using HQLs expressions. For
Continue reading[SOLVED] Error executing DDL "insert into …" via JDBC Statement in Spring Boot
Issue I’m working on a simple Spring Boot project, and I try to load some data from an import.sql file. The table is created from the entity, but the data isn’t loaded and I receive this error below. The problem
Continue reading