new method for getting all habit assigns for user (including suspended)
@@ -16,6 +16,15 @@ import org.springframework.stereotype.Repository;
@Repository
public interface HabitAssignRepo extends JpaRepository<HabitAssign, Long>,
JpaSpecificationExecutor<HabitAssign> {
+ /**
+ * Method to find all {@link HabitAssign} by {@link User} id
+ * (including suspended).
+ *
+ * @param userId {@link User} id.
+ * @return list of {@link HabitAssign} instances.
+ */
+ List<HabitAssign> findAllByUserId(Long userId);
+
/**
* Method to find all {@link HabitAssign} by {@link User} id
* (with not suspended status).
