Skip to content
Advertisement

Tag: spring-data-jpa

Duplicates in Output Java Spring Boot JPA

I’m working on an application with following Entities and code: The RestController for MotionPicture: My DB Table: clip columns: id(1-100 unique), date, size Table: motion_picture columns: id(1-100 unique), date, size, duration association table: motion_picture_clips columns: motion_picture_id (1-100 random), clips_id (1-100 unique) When I run the programm and make a the getRequest in Postman (getById and getAll) –> I’ll get duplicated

Join tables in spring data jpa

I have an issue in joining two tables column. I have two entities Status Report and Employee. and I want the data of employee inside StatusReport. Another class is the employee: As you can see employee entity itself have some other joins on other tables. Which is a deparment table. When I join Status Report with Employee I get Sql

Mapping a Star Schema with Spring Boot JPA

I’m struggling to identify the right annotations to use to map a star schema with Spring Boot JPA. Let’s consider 3 tables: DIM_One (1)——–(1..n) FACT (1..n) ———— (1) DIM_Two DIM_One and DIM_Two both have an id that is their primary key. FACT’s primary key is the combination of (DIM_One_pk, DIM_Two_pk) For now, the annotations in my DIM tables are similar

Querying with ManyToOne association results in SQLException

I am trying out a simple use case for many-to-one association with Spring Data JPA but it is resulting in an SQLException. Model is of typical Order and OrderItem classes. Order OrderItem Unit test Unit test passes. But if I uncomment the line to find all items from OrderItemRepository it fails with following exception: What could be missing here ?

I have an error but dependencies include in gradle root and gradle module config, why?

I have root config gradle.build and have build.gradle in module After download dependencies and add in models annotations like @Entity, @Table @Id and etc. i have an error: cannot find symbol @Entity ^ symbol: class Entity But i have spring-boot-starter-jpa in dependencies, i don’t know why in module i can’t use dependencies. Answer With dependencyManagement you only manage dependencies like

Advertisement