All Questions
6 questions
0
votes
3
answers
313
views
How best to structure my Service/Repository layers when persisting a Many to One object?
I'm working on a project where I need to do CRUD operations on Book and Library objects. Naturally the relationship between Book and Library is Many to One, like so:
@Entity
@Getter
@Setter
@...
3
votes
1
answer
6k
views
Best way to handle lazy models with mapstruct and spring transactional scope
In a typical Java Spring Web APP:
we have the following layers:
Model [DB Models]
Repositories [where you have queries to DB]
Services [Business service where you have the @Transactional annotation]
...
1
vote
0
answers
715
views
Performance impact of JPARepository save() on a large database table with index
We have a few tables with a large amount of data and with indexes on those tables to help in faster retrieval.
We are also using Spring Data JPA JpaRepository for adding data to those tables using the ...
2
votes
2
answers
2k
views
Returning JPA Entities in Rest Api's?
Recently Ive seen so many devs working with the stack Spring/JPA and returning all these JPA entities on their rest controllers.
In my opinion it's a BAD PRACTICE for several reason such: ...
5
votes
6
answers
3k
views
Allowing users to add their own custom fields in a Spring MVC Hibernate application - What's an ideal approach?
We all may have seen applications like JIRA, or many CRM or other applications that allow its users to define their own custom fields to an entity, and do a variety of stuff with it, like making them ...
3
votes
0
answers
39
views
Approach for querying an arbitrary set of user submitted fields and values in Spring application? Like a shopping site sidebar search?
I am working on a Spring Boot and Angular application which has a requirement to search based on any number of the available filters being applied to a list. For example, a user searches on 'Title' ...