You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: demo-sql2o/src/main/java/com/example/PizzaRepository.java
+85-3Lines changed: 85 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,7 @@
9
9
importorg.sql2o.Query;
10
10
importorg.sql2o.Sql2o;
11
11
12
+
importjava.math.BigDecimal;
12
13
importjava.util.List;
13
14
importjava.util.stream.Collectors;
14
15
@@ -23,13 +24,13 @@ public PizzaRepository(Sql2o sql2o) {
23
24
publicList<Pizza> findOrderByIdAsc() {
24
25
try (Connectioncon = sql2o.open()) {
25
26
returncon.createQuery("SELECT p.id, p.name, p.price, b.id AS baseId, b.name AS baseName, t.id AS toppingId, t.name AS toppingName FROM pizza p INNER JOIN base b ON (b.id = p.base_id) INNER JOIN pizza_toppings pt ON (pt.pizza_id = p.id) INNER JOIN topping t ON (t.id = pt.toppings_id) ORDER BY p.id ASC")
0 commit comments