Skip to content
Snippets Groups Projects
Commit aa35f07b authored by Andreas's avatar Andreas
Browse files

refactor/Updated inncorrect repository method

parent 95cbe48d
No related branches found
No related tags found
1 merge request!95Feat/group saving
Pipeline #285201 passed
...@@ -10,5 +10,5 @@ import java.util.Optional; ...@@ -10,5 +10,5 @@ import java.util.Optional;
@Repository @Repository
public interface GroupRepository extends JpaRepository<Group, Long> { public interface GroupRepository extends JpaRepository<Group, Long> {
Optional<Group> findBygGoals_Id(long id); Optional<Group> findByGoals_Id(long id);
} }
...@@ -115,7 +115,7 @@ public class GoalServiceImpl implements GoalService { ...@@ -115,7 +115,7 @@ public class GoalServiceImpl implements GoalService {
*/ */
@Override @Override
public Group getGroup(Long goalId) { public Group getGroup(Long goalId) {
Optional<Group> optionalGroup = groupRepository.findBygGoals_Id(goalId); Optional<Group> optionalGroup = groupRepository.findByGoals_Id(goalId);
if (optionalGroup.isPresent()) { if (optionalGroup.isPresent()) {
return optionalGroup.get(); return optionalGroup.get();
} else { } else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment