oleksii-novikov-onix commented on code in PR #4570:
URL: https://github.com/apache/fineract/pull/4570#discussion_r2051000794
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarInstanceRepository.java:
##########
@@ -45,24 +52,27 @@ public interface CalendarInstanceRepository extends
JpaRepository<CalendarInstan
* {@link CalendarType}
* @return
*/
+ @Cacheable(key = "T(java.util.Objects).hash(#entityId, #entityTypeId,
#calendarTypeId)")
CalendarInstance findByEntityIdAndEntityTypeIdAndCalendarTypeId(Long
entityId, Integer entityTypeId, Integer calendarTypeId);
+ @Cacheable(key = "T(java.util.Objects).hash(#entityId, #entityTypeId)")
@Query("select ci from CalendarInstance ci where ci.entityId = :entityId
and ci.entityTypeId = :entityTypeId")
CalendarInstance findCalendarInstaneByEntityId(@Param("entityId") Long
entityId, @Param("entityTypeId") Integer entityTypeId);
Review Comment:
findByEntityIdAndEntityTypeId and findCalendarInstanceByEntityId use the
same key pattern, probably this could lead to a collision, right?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]