From 14d3ee9802e49a75a9e1ae1acccd91f156426011 Mon Sep 17 00:00:00 2001 From: Yvan Peter <yvan.peter@univ-lille.fr> Date: Fri, 14 Feb 2020 08:25:19 +0100 Subject: [PATCH] explication table association --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index ead985b..09f2d90 100644 --- a/README.md +++ b/README.md @@ -949,6 +949,8 @@ de données. Cela pourra être géré au niveau du DAO grâce à [JDBI](https://jdbi.org/#_default_methods). Cet extrait de code montre comment faire : + import org.jdbi.v3.sqlobject.transaction.Transaction; + public interface PizzaDao { @SqlUpdate("CREATE TABLE IF NOT EXISTS Pizzas ....") @@ -957,6 +959,7 @@ comment faire : @SqlUpdate("CREATE TABLE IF NOT EXISTS PizzaIngredientsAssociation .....") void createAssociationTable(); + @Transaction default void createTableAndIngredientAssociation() { createAssociationTable(); createPizzaTable(); -- GitLab