File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
src/main/java/com/gabriel_torelo/game_list/services Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 88import com .gabriel_torelo .game_list .dto .GameMinDTO ;
99import com .gabriel_torelo .game_list .dto .GameShortDTO ;
1010import com .gabriel_torelo .game_list .entities .Game ;
11+ import com .gabriel_torelo .game_list .projections .GameMinProjection ;
1112import com .gabriel_torelo .game_list .repositories .GameRepository ;
1213
1314@ Service
@@ -36,4 +37,11 @@ public GameLongDTO readMoreID(Long id) {
3637
3738 return new GameLongDTO (rGame );
3839 }
40+
41+ @ Transactional (readOnly = true )
42+ public List <GameMinDTO > readListID (Long id ) {
43+ List <GameMinProjection > rGameProj = gameRepository .readListID (id );
44+
45+ return rGameProj .stream ().map (gameProject -> new GameMinDTO (gameProject )).toList ();
46+ }
3947}
You can’t perform that action at this time.
0 commit comments