Skip to content
Snippets Groups Projects
Commit 14d3ee98 authored by Yvan Peter's avatar Yvan Peter
Browse files

explication table association

parent c7b1acfa
No related branches found
No related tags found
No related merge requests found
......@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment