Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
22 views

I'm having trouble managing DTOs. I'm working as follows: I have a reusable DTO called PhoneResponseDTO that is used in both findAll and findByID. Then I created a DTO for each operation like Created, ...
gustavo's user avatar
  • 22
0 votes
0 answers
62 views

In a Spring Boot 2.7.x application with Hibernate/JPA, there are two tables: tickets complaint_id (PK, VARCHAR(255)) attachment complaint_id (FK, VARCHAR(255)) other fields: id, file_name, ...
RaviSai1819's user avatar
1 vote
0 answers
54 views

I'm using Spring Data JPA with an entity that contains a Map<String, String> field. The map is stored in the database as a TEXT column (JSON string). JPA automatically stores the map as a ...
Nitesh Tiwari's user avatar
1 vote
1 answer
66 views

I have a service method that performs the following operations in sequence: Calls a read method annotated with a custom read-only transaction annotation (equivalent to @Transactional(readOnly = true))...
Rorschach's user avatar
-3 votes
0 answers
84 views

JPA/Hibernate EntityGraph with Specification and Pagination not loading all related entities correctly I'm working on a JHipster-generated application and need to create APIs that load entities from ...
Рейн Глеб's user avatar
2 votes
3 answers
192 views

I'm working with these entities: UserEntity: @Entity @Table (name = "users", uniqueConstraints = @UniqueConstraint(columnNames={"name"})) public class UserEntity { @Id @...
Rikelo's user avatar
  • 33
Best practices
0 votes
7 replies
187 views

I am new to JPA and learning it. Now I have an Oracle procedure in system, which now needs to be made DB Agnostic, that can run on Postgres. For that I want to write the same functionality of ...
Surodip's user avatar
  • 503
2 votes
1 answer
152 views

I'm delving into Java concepts such as dynamic proxies, reflection, etc. That's why I'm trying to implement some Spring features. Anyway... I created the dynamic proxy: @Override public Object invoke(...
kitt51's user avatar
  • 11
0 votes
1 answer
148 views

I know how to use the HTTP PUT method to update an entire entity, but how to update a single field for an example? I gonna need a lot of if's? My method for updating the data in a Service: public ...
Nicolas Medeiros Cascaes's user avatar
1 vote
0 answers
30 views

I have Post and Comment entities with one to many relationship. @Entity public class Post{ @Id private Integer id; @OneToMany(mappedBy ="post") private Set<Comment&...
Berhe Birhane's user avatar
1 vote
2 answers
244 views

Could you please help me with how to avoid N+1 queries in Spring? For example, I have the following two entities: @ManyToOne(fetch = FetchType.EAGER) @JoinColumn(name="CourseID") private ...
Dma_Dugn's user avatar
1 vote
1 answer
111 views

In Spring Boot I have an entity: @Entity @Table(name = "Product") @EntityListeners(AuditingEntityListener.class) public class Product extends BaseEntity { ... @NotNull @...
Inux's user avatar
  • 15
2 votes
0 answers
83 views

I’m experimenting with Spring Data and Hibernate to implement multi-tenancy in an existing app using a discriminator column with @TenantId on the entities. I have seen that hibernate includes tenant ...
krillov's user avatar
  • 139
2 votes
1 answer
265 views

I am trying to learn how to call stored procedure from springboot data jpa repository and returns a cursor from stored procedure. While I am implementing I am getting error like org.springframework....
Mr.DevEng's user avatar
  • 1,688
0 votes
1 answer
58 views

I have the most basic ManyToMany example, Project and Employee. With a PUT request, I will project to employee and within the same function employee to project. public Employee assignProjectToEmployee(...
king_potato's user avatar
2 votes
0 answers
110 views

I’m struggling with reusing a Specification<T> inside another one. Entities: Group has a list of StudentGroupInfo. I already have a Specification<Group> that can filter Group by various ...
Maksym Gaiduchek's user avatar
1 vote
1 answer
236 views

I want to implement a custom column handler in Hibernate/Spring Boot app. I tries this: Entity: @Entity @Table(name = "single_user") @Getter @Setter public class SingleUser { @Id @...
Peter Penzov's user avatar
  • 1,074
2 votes
1 answer
60 views

I'm implementing some tests for REST endpoints that manipulate a database (in test context, I use an H2 database) via spring data JPA, and I would like to have all the tables clean (no data in it, and ...
Skinay's user avatar
  • 21
1 vote
1 answer
89 views

I'm working on a system where I need to store processed data across approximately 30 tables in a SQL Server database. For frequently used tables, I'm using JPA, while the majority of the insertions ...
Tech Savy's user avatar
0 votes
0 answers
58 views

My Java code is throwing the following error: "A collection with cascade='all-delete-orphan' was no longer referenced by the owning entity instance: br.com.unika.pathdetail.entity.ProcedureStep....
Arthur Andrade's user avatar
0 votes
0 answers
32 views

I am trying to get the integration tests of my app running (the app itself seems to be working). The issue seems to be related to how the ID column of a table is defined (I suspect that auto_increment ...
user2912328's user avatar
0 votes
0 answers
72 views

I have a requirement to create routing to different endpoints using gateway (ended up using spring cloud gateway [reactive stack]). Upon setting up Spring Boot 3 project with dependencies, when added ...
Arpit S's user avatar
  • 305
0 votes
0 answers
87 views

Spring Boot > 3.5.0 + Spring Data JPA + HotSwapAgent + Vaadin causes injection error I’ve tried multiple project setups using Vaadin Start, Spring Initializr, and various GitHub example ...
FoobarLegend's user avatar
0 votes
1 answer
51 views

Setup: SpringBoot application using SpringJPA with Hibernate I have two entities: A and B. Set is a child of A. I want to remove a B and create another one in a characteristic which would hit a unique ...
itsfoobar's user avatar
1 vote
1 answer
88 views

I have an unusual situation which requires that I obtain unique identifiers from an Oracle sequence without actually saving a row to the table which relies on the sequence. My entity: @Table(name = '...
FerdTurgusen's user avatar

1
2 3 4 5
468