Bonjour,

J'ai besoin lorsque je supprime une entrée de la table "Personnel" cela supprime tout ce qu'il lui est attaché, mais pas l'inverse.

Je me demande si dans la configuration actuelle je peux, et si je ne vais pas être obligé de créer une table relationnel.

Pourriez vous m'aider ?
Merci

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
 
 
# config/doctrine/schema.yml
 
Intitule:
  columns:
    name:  {type: string(255), notnull:true}
    category: {type: integer, notnull:false}
 
 
 
Personnel:
  actAs: {Timestampable: ~ }
  columns:
    name: {type: string(255), notnull:true}
    lastname: {type: string(255), notnull:true}
    compagny_id: {type: integer, notnull:false}
    dateNaissance: {type: date, notnull:false}
    dateEmbauche: {type: date, notnull:false}
    fonction_id: {type: integer, notnull:false}
    responsable_id: {type: integer, notnull:false}
    autoriSoudure:  {type: boolean, default:false}
    habilElec:  {type: boolean, default:false}
    numHabilElec: {type: string(255), notnull:false}
  relations:
    Intitule:
      class: Intitule
      local: compagny_id
      foreign: id
      foreignAlias: Intitules
    Responsable:
      class: Personnel
      local: responsable_id
      foreign: id
      foreignAlias: Responsables
    Fonction:
      class: Intitule
      local: fonction_id
      foreign: id
      foreignAlias: Fonctions
 
 
VisiteMedical:
  actAs: {Timestampable: ~ }
  columns:
    personnel_id: {type: integer, notnull:true, unique:true }
    lastVm: {type: date, notnull:false}
    validite:  {type: date, notnull:false}
    etat:  {type: boolean, default:true, default:1}
  relations:
    Personnel:
      foreignAlias: Fiches
 
 
 
Formation:
  actAs: {Timestampable: ~ }  
  columns:
    personnel_id: {type: integer, notnull:false}
    compagny_id: {type: integer, notnull:false}
    date:  {type: date, notnull:false}
    titre_id: {type: integer, notnull:true}
    niveau: {type: string(255), notnull:false}
    type: {type: integer, notnull:false, default:0}
    dateTitre:  {type: date, notnull:false}
    validite:  {type: date, notnull:false}
    etat:  {type: boolean, default:false, default:1}
  relations:
    Personnel:
      foreignAlias: Fiches
    Compagny:
      class: Intitule
      local: compagny_id
      foreign: id
      foreignAlias: Intitules
    Titre:
      class: Intitule
      local: titre_id
      foreign: id
      foreignAlias: Intitules
 
 
 
Epi:
  actAs: {Timestampable: ~ }  
  columns:
    personnel_id: {type: integer, notnull:true, unique:true }
    tailleTeeShirtML: {type: integer, notnull:false}
    tailleTeeShirtMC: {type: integer, notnull:false}
    tailleBlouson: {type: integer, notnull:false}
    tailleParka: {type: integer, notnull:false}
    tailleVesteBound: {type: integer, notnull:false}
    taillePantaBound: {type: integer, notnull:false}
    tailleEntreJambe: {type: integer, notnull:false}
    tailleChaussure: {type: integer, notnull:false}
    tailleSweet: {type: integer, notnull:false}
    tailleChemise: {type: integer, notnull:false}
    tailleGilet: {type: integer, notnull:false}
    nbVeste: {type: integer, notnull:false}
    nbPanta: {type: integer, notnull:false}
    modelChaussure: {type: integer, notnull:false}
  relations:
    Personnel:
      foreignAlias: Fiches