In Spring Data JPA, you can use the Crud Repository or Jpa Repository interfaces to create queries for your entities to filter by multiple values of a column. You can use the IN keyword in your query method. This is an extended use case for my previous problems: https://programtom.com/dev/2023/10/24/how-to-get-child-records-count-with-spring-repository/ Let’s assume you have an entity…
Category: Spring
How to prevent StackOverflow Error – JSON from Spring Repository
To prevent a StackOverflow Error when writing Data to JSON REST Endpoints – retrieved from a Spring Repository, you need to ensure that circular references are handled properly, particularly in the context of bidirectional relationships between entities. This is a follow from my previous post “How to get child records count with Spring Repository“. When…
How to get child records count with Spring Repository
Many times you are required to get the count of child records associated with a parent record and with Spring Repository, you can utilize the JpaRepository provided by Spring Data. Assuming you have a one-to-many relationship between parent and child entities, you can create a method in your repository interface to fetch the count of…
The Secret Key to Successful Startup is…
The Secret Key to Successful Startup is Use as Much 3rd party API as possible, so your work is basically – near zero. There are services for authentication and authorization, file storage, hosting, AI, payment gateways and integrations user information from social media and so on. Using third-party APIs can be a valuable strategy for…
Micro Service Java Modules for Any App
This will be an article – edited multiple times – that will include links to packages of Micro Service Java Modules for Any App. Such common modules are user functionalities, roles, access, security, notification systems, performance and more. After the basic stuff, I’m gonna dive into app building and several modules required for a blockchain…
