Précédent   Forum des professionnels en informatique > PHP > Bibliothèques et frameworks > symfony
symfony Forum d'entraide sur le framework PHP symfony. Avant de poster : cours symfony et FAQ symfony
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 29/04/2011, 16h34   #1
Membre habitué
 
Homme Ludovic
Étudiant
Inscription : janvier 2011
Messages : 124
Détails du profil
Informations personnelles :
Nom : Homme Ludovic
Localisation : France

Informations professionnelles :
Activité : Étudiant

Informations forums :
Inscription : janvier 2011
Messages : 124
Points : 140
Points : 140
Par défaut Transformation d'un backend

Bonjour,

Dans le cadre d'un stage, je dois adapter les modules générés par l'admin generator pour en faire une interface web classique (transformer un frontend en backend).
Je cherche donc à ajouter une action show, seulement voilà je n'arrive pas à récupérer les données liées aux relations N..N, je réfléchis encore mais j'aimerai d'abord savoir si vous pensez que c'est réalisable ?

J'ai un autre problème qui je pense est plus facile à résoudre :
J'ai une table qui contient deux clés étrangères qui pointent vers la même table seulement voilà l'affichage dans le backend ne fonctionne pas alors que j'ai suivi des exemples que j'ai trouvé dans ce forum :
Code :
1
2
3
4
5
6
7
8
9
10
    Node:
      class: Node
      local: node_id
      foreign: id
      type: one
    Node_5:
      class: Node
      local: node_leading_id
      foreign: id
      type: one
Voilà, en gros une personne a un node et un node_leading donc j'ai un fichier generator.yml comme ceci :
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
generator:
  class: sfDoctrineGenerator
  param:
    model_class:           Person
    theme:                 admin
    non_verbose_templates: true
    with_show:             true
    singular:              ~
    plural:                ~
    route_prefix:          person
    with_doctrine_route:   true
    actions_base_class:    sfActions
 
    config:
      actions: ~
#        _edit: { credentials: admin }
#        _delete: { credentials: admin }
      fields:  ~
      list:
        display: [=name, firstname, email, role, title, Institute, Domain, N2dwg, Node, Node_5]
#...
Mais j'ai cette erreur qui s'affiche :
Code :
1
2
500 | Internal Server Error | Doctrine_Record_UnknownPropertyException
Unknown record property / related component "node5" on "Person"
PeytaWodka est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 02/05/2011, 08h45   #2
Membre éclairé
 
Avatar de llaffont
 
Loïc Laffont
Inscription : juin 2007
Messages : 495
Détails du profil
Informations personnelles :
Nom : Loïc Laffont
Âge : 34
Localisation : France, Loire (Rhône Alpes)

Informations forums :
Inscription : juin 2007
Messages : 495
Points : 380
Points : 380
essais comme ça.

Code :
1
2
3
4
5
6
7
8
9
10
Node:
      class: Node
      local: node_id
      foreignAlias: node_id
      type: one
    Node_5:
      class: Node
      local: node_leading_id
      foreignAlias: node5_id
      type: one
__________________
En théorie tout devrait fonctionner...

La France a un incroyable talent : Son retard en technologie informatique
llaffont est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 02/05/2011, 09h33   #3
Membre habitué
 
Homme Ludovic
Étudiant
Inscription : janvier 2011
Messages : 124
Détails du profil
Informations personnelles :
Nom : Homme Ludovic
Localisation : France

Informations professionnelles :
Activité : Étudiant

Informations forums :
Inscription : janvier 2011
Messages : 124
Points : 140
Points : 140
Cette solution ne fonctionne pas. J'ai essayé de renommer la deuxième relation en NodeLeading et maintenant quand je choisi d'afficher NodeLeading et Node j'ai la colonne NodeLeading qui s'affiche bien alors que Node n'affiche rien donc je pense que la relation Node est écrasé par NodeLeading.

Est-ce que je peux surcharger la méthode getNode() dans Person et je fais un appel à une requête getNodeById() de NodeTable.class.php sinon ?
PeytaWodka est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 02/05/2011, 11h42   #4
Membre éclairé
 
Avatar de llaffont
 
Loïc Laffont
Inscription : juin 2007
Messages : 495
Détails du profil
Informations personnelles :
Nom : Loïc Laffont
Âge : 34
Localisation : France, Loire (Rhône Alpes)

Informations forums :
Inscription : juin 2007
Messages : 495
Points : 380
Points : 380
Avant de surcharger quoi que ce soit il me semble bon de fouiller côté schema.
Car si rien ne s'affiche c'est qu'il y'a soucis a ce niveau. Car au minimum tu devrais avoir un ID représentant la relation.

Tu as bien utilisé la balise foreignAlias au lieu de foreign ?

Montre nous un peu plus de ton schema car juste avec les relations on peut vite extrapoler
__________________
En théorie tout devrait fonctionner...

La France a un incroyable talent : Son retard en technologie informatique
llaffont est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 02/05/2011, 13h20   #5
Membre habitué
 
Homme Ludovic
Étudiant
Inscription : janvier 2011
Messages : 124
Détails du profil
Informations personnelles :
Nom : Homme Ludovic
Localisation : France

Informations professionnelles :
Activité : Étudiant

Informations forums :
Inscription : janvier 2011
Messages : 124
Points : 140
Points : 140
Suite à une discussion avec mon tuteur, on a décidé de transformer la deuxième relation en un booléen mais même après supprimer la deuxième relation, il ne m'affiche toujours rien. Par contre quand je demande node_id, il m'affiche bien l'id.

Code :
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
Person:
  connection: doctrine
  tableName: person
  actAs : { Timestampable: ~ }
  columns:
    id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: true
 #...
    node_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: false
      notnull: false
      autoincrement: false
#...
    Node:
      class: Node
      local: node_id
      foreignAlias: node_id
      type: one
#    NodeLeading:
#      class: Node
#      local: node_leading_id
#      foreignAlias: nodeleading_id
#      type: one
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Node:
  connection: doctrine
  tableName: node
  columns:
    id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: true
#..
    Person:
      local: id
      foreign: node_id
      type: many
#    Person_5:
#      class: Person
#      local: id
#      foreign: node_leading_id
#      type: many
PeytaWodka est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 02/05/2011, 14h01   #6
Membre éclairé
 
Avatar de llaffont
 
Loïc Laffont
Inscription : juin 2007
Messages : 495
Détails du profil
Informations personnelles :
Nom : Loïc Laffont
Âge : 34
Localisation : France, Loire (Rhône Alpes)

Informations forums :
Inscription : juin 2007
Messages : 495
Points : 380
Points : 380
Je penses que tu as un conflit dans tes noms.
Tu nommes un colonne de ta table node_id et tu donnes le même nom à ton Alias.

Perso je la jouerais comme ça :

Entrecoupé de
Code :
php symfony doctrine:clean-model-files
afin de nettoyer les models lié aux anciens schema qui par moment pose problème.

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Person:
  actAs : { Timestampable: ~ }
  columns:
    id:
      type: integer(4)
    node_id:
      type: integer(4)
      unsigned: true
#...
  relations:
    Node:
      class: Node
      local: node_id
      foreignAlias: person_nodes
      type: one
    NodeLeading:
      class: Node
      local: node_leading_id
      foreignAlias: person_nodeleadings
      type: one
Comme tu n'a pas mis l'intégralité de ton schema j'extrapole en disant que tu souhaites récupérer une valeur texte de ta table plutôt que l'id il te faudra surcharger la class avec un :

Code :
1
2
3
	public function __toString(){
		return $this->getChampString();
	}
__________________
En théorie tout devrait fonctionner...

La France a un incroyable talent : Son retard en technologie informatique
llaffont est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 03/05/2011, 11h46   #7
Membre habitué
 
Homme Ludovic
Étudiant
Inscription : janvier 2011
Messages : 124
Détails du profil
Informations personnelles :
Nom : Homme Ludovic
Localisation : France

Informations professionnelles :
Activité : Étudiant

Informations forums :
Inscription : janvier 2011
Messages : 124
Points : 140
Points : 140
Pour le moment je passe par un booléen pour ce problème, je le retrouverai surement dans d'autres tables mais j’essaierai de me débrouiller.

En tout cas, merci pour ton aide.
PeytaWodka est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 03/05/2011, 12h30   #8
Modérateur
 
Avatar de Michel Rotta
 
Homme Michel Rotta
Responsable d'exploitation informatique
Inscription : septembre 2005
Messages : 4 913
Détails du profil
Informations personnelles :
Nom : Homme Michel Rotta
Âge : 49
Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

Informations professionnelles :
Activité : Responsable d'exploitation informatique
Secteur : Distribution

Informations forums :
Inscription : septembre 2005
Messages : 4 913
Points : 7 505
Points : 7 505
Tu peux mettre tous le shema.yml ?
__________________
Si tu donnes un poisson à un homme, il mangera un jour. Si tu lui apprends à pêcher, il mangera toujours (Lao Tseu).
  • Pensez à valoriser les réponses pertinantes, cliquez sur le bouton vert +1 pour indiquer votre accord avec la solution proposée.
  • Pensez à utiliser la balise [code] pour afficher du code, elle est cachée sous le bouton [#] dans l'éditeur.
  • Une discussion est terminée ? Alors le bouton est votre ami !
Michel Rotta est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 03/05/2011, 15h40   #9
Membre habitué
 
Homme Ludovic
Étudiant
Inscription : janvier 2011
Messages : 124
Détails du profil
Informations personnelles :
Nom : Homme Ludovic
Localisation : France

Informations professionnelles :
Activité : Étudiant

Informations forums :
Inscription : janvier 2011
Messages : 124
Points : 140
Points : 140
Code :
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
Activity:
  connection: doctrine
  tableName: activity
  columns:
    id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: true
    num:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: false
      notnull: true
      autoincrement: false
    activitytype_id:
      type: string(3)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    name:
      type: string(8)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    longname:
      type: string(60)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    description:
      type: string()
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    homepage_url:
      type: string(200)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
  relations:
    Activitytype:
      local: activitytype_id
      foreign: id
      type: one
      onDelete: CASCADE
    Activityitem:
      local: id
      foreign: activity_id
      type: many
    Event:
      local: id
      foreign: activity_id
      type: many
    Institutes:
      class: Institute
      local: activity_id
      foreign: institute_id
      refClass: InstituteActivity
    Persons:
      class: Person
      local: activity_id
      foreign: person_id
      refClass: PersonActivity
Activityitem:
  connection: doctrine
  tableName: activityitem
  columns:
    id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: true
    num:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: false
      notnull: true
      autoincrement: false
    activity_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: false
      notnull: true
      autoincrement: false
    name:
      type: string(50)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
  relations:
    Activity:
      local: activity_id
      foreign: id
      type: one
      onDelete: CASCADE
    Doctype:
      local: id
      foreign: activityitem_id
      type: many
Activitytype:
  connection: doctrine
  tableName: activitytype
  columns:
    id:
      type: string(3)
      fixed: false
      unsigned: false
      primary: true
      autoincrement: false
    name:
      type: string(80)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    description:
      type: string()
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
  relations:
    Activity:
      local: id
      foreign: activitytype_id
      type: many
Country:
  connection: doctrine
  tableName: country
  columns:
    id:
      type: string(2)
      fixed: true
      unsigned: false
      primary: true
      autoincrement: false
    name:
      type: string(60)
      fixed: false
      unsigned: false
      primary: false
      default: ''
      notnull: true
      autoincrement: false
  relations:
    Institute:
      local: id
      foreign: country_id
      type: many
Doc:
  connection: doctrine
  tableName: doc
  actAs : { Timestampable: ~ }
  columns:
    id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: true
    person_provider_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: false
      notnull: false
      autoincrement: false
    person_author_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: false
      notnull: false
      autoincrement: false
    docot_id:
      type: string(5)
      fixed: true
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    ref:
      type: string(45)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    name:
      type: string(100)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    filename:
      type: string(150)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    description:
      type: string(200)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    is_public:
      type: boolean
      fixed: false
      unsigned: false
      primary: false
      default: '1'
      notnull: true
      autoincrement: false
    is_enabled:
      type: boolean
      fixed: false
      unsigned: false
      primary: false
      default: '0'
      notnull: true
      autoincrement: false
  relations:
    Docot:
      local: docot_id
      foreign: id
      type: one
      onDelete: SET NULL
    Person:
      local: person_author_id
      foreign: id
      type: one
      onDelete: SET NULL
    Person_3:
      class: Person
      local: person_provider_id
      foreign: id
      type: one
      onDelete: SET NULL
    Doctypes:
      class: Doctype
      local: doc_id
      foreign: doctype_id
      refClass: DocDoctype
DocDoctype:
  connection: doctrine
  tableName: doc_doctype
  columns:
    doc_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: false
    doctype_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: false
  relations:
    Doc:
      local: doc_id
      foreign: id
      type: one
      onDelete: CASCADE
    Doctype:
      local: doctype_id
      foreign: id
      type: one
      onDelete: CASCADE
Docot:
  connection: doctrine
  tableName: docot
  columns:
    id:
      type: string(5)
      fixed: true
      unsigned: false
      primary: true
      autoincrement: false
    name:
      type: string(100)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
  relations:
    Doc:
      local: id
      foreign: docot_id
      type: many
Doctype:
  connection: doctrine
  tableName: doctype
  columns:
    id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: true
    num:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: false
      notnull: true
      autoincrement: false
    activityitem_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: false
      notnull: true
      autoincrement: false
    name:
      type: string(100)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
  relations:
    Activityitem:
      local: activityitem_id
      foreign: id
      type: one
      onDelete: CASCADE
    DocDoctype:
      class: Doc
      local: doctype_id
      foreign: doc_id
      refClass: DocDoctype
Domain:
  connection: doctrine
  tableName: domain
  columns:
    id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: true
    name:
      type: string(50)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
  relations:
    Person:
      local: id
      foreign: domain_id
      type: many
    Persons:
      class: Person
      local: domain_id
      foreign: person_id
      refClass: PersonDomain
Event:
  connection: doctrine
  tableName: event
  columns:
    id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: true
    name:
      type: string(50)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    type:
      type: enum(7)
      fixed: false
      unsigned: false
      values:
        - News
        - Call
        - Meeting
      primary: false
      default: News
      notnull: false
      autoincrement: false
    activity_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: false
      notnull: false
      autoincrement: false
    person_responsible_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: false
      notnull: false
      autoincrement: false
    purpose:
      type: string(200)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    description:
      type: string()
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    institute_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: false
      notnull: false
      autoincrement: false
    place:
      type: string(60)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    date:
      type: date(25)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    duration:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: false
      notnull: false
      autoincrement: false
    registration_open_time:
      type: timestamp(25)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    registration_close_time:
      type: timestamp(25)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    nice_name_1:
      type: string(50)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    host_website_1:
      type: string(200)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    nice_name_2:
      type: string(50)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    host_website_2:
      type: string(200)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    is_news:
      type: boolean
      fixed: false
      unsigned: false
      primary: false
      default: '1'
      notnull: false
      autoincrement: false
    is_important:
      type: boolean
      fixed: false
      unsigned: false
      primary: false
      default: '0'
      notnull: false
      autoincrement: false
  relations:
    Activity:
      local: activity_id
      foreign: id
      type: one
      onDelete: SET NULL
    Institute:
      local: institute_id
      foreign: id
      type: one
      onDelete: SET NULL
    Person:
      local: person_responsible_id
      foreign: id
      type: one
      onDelete: SET NULL
    Persons:
      class: Person
      local: event_id
      foreign: person_id
      refClass: EventPerson
EventPerson:
  connection: doctrine
  tableName: event_person
  columns:
    event_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: false
    person_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: false
  relations:
    Event:
      local: event_id
      foreign: id
      type: one
      onDelete: CASCADE
    Person:
      local: person_id
      foreign: id
      type: one
      onDelete: CASCADE
Expertise:
  connection: doctrine
  tableName: expertise
  columns:
    id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: true
    name:
      type: string(40)
      fixed: false
      unsigned: false
      primary: false
      default: ''
      notnull: true
      autoincrement: false
  relations:
    Persons:
      class: Person
      local: expertise_id
      foreign: person_id
      refClass: PersonExpertise
    Resources:
      class: Resource
      local: expertise_id
      foreign: resource_id
      refClass: ResourceExpertise
Institute:
  connection: doctrine
  tableName: institute
  actAs : { Timestampable: ~ }
  columns:
    id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: true
    node_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: false
      notnull: false
      autoincrement: false
    is_node_leader:
      type: boolean
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    participant_status:
      type: enum(11)
      fixed: false
      unsigned: false
      values:
        - Participant
        - 'Lab non EPN'
        - Associate
      primary: false
      default: 'Lab non EPN'
      notnull: true
      autoincrement: false
    participant_num:
      type: string(6)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    institute_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: false
      notnull: false
      autoincrement: false
    name:
      type: string(10)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    fullname:
      type: string(80)
      fixed: false
      unsigned: false
      primary: false
      default: ''
      notnull: true
      autoincrement: false
    country_id:
      type: string(2)
      fixed: true
      unsigned: false
      primary: false
      default: FR
      notnull: true
      autoincrement: false
    address:
      type: string(120)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    postcode:
      type: string(10)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    city:
      type: string(30)
      fixed: false
      unsigned: false
      primary: false
      default: ''
      notnull: true
      autoincrement: false
    cedex:
      type: string(10)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    excellence_fields:
      type: string()
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    labos:
      type: string()
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    specific_role:
      type: string()
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    homepage:
      type: string(120)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
  relations:
    Country:
      local: country_id
      foreign: id
      type: one
      onDelete: CASCADE
    Institute:
      local: id
      foreign: institute_id
      type: many
    Node:
      local: node_id
      foreign: id
      type: one
      onDelete: SET NULL
    Event:
      local: id
      foreign: institute_id
      type: many
    Activities:
      class: Activity
      local: institute_id
      foreign: activity_id
      refClass: InstituteActivity
    Keywords:
      class: Keyword
      local: institute_id
      foreign: keyword_id
      refClass: InstituteKeyword
    Person:
      local: id
      foreign: institute_id
      type: many
    Resource:
      local: id
      foreign: institute_id
      type: many
InstituteActivity:
  connection: doctrine
  tableName: institute_activity
  columns:
    activity_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: false
    institute_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: false
    special_status:
      type: enum(11)
      fixed: false
      unsigned: false
      values:
        - Coordinator
      primary: false
      notnull: false
      autoincrement: false
  relations:
    Activity:
      local: activity_id
      foreign: id
      type: one
      onDelete: CASCADE
    Institute:
      local: institute_id
      foreign: id
      type: one
      onDelete: CASCADE
InstituteKeyword:
  connection: doctrine
  tableName: institute_keyword
  columns:
    institute_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: false
    keyword_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: false
  relations:
    Institute:
      local: institute_id
      foreign: id
      type: one
      onDelete: CASCADE
    Keyword:
      local: keyword_id
      foreign: id
      type: one
      onDelete: CASCADE
Job:
  connection: doctrine
  tableName: job
  actAs : { Timestampable: ~ }
  columns:
    id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: true
    name:
      type: string(200)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    institute:
      type: string(200)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    location:
      type: string(100)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    duration:
      type: string(200)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    qualification:
      type: string()
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    duties:
      type: string()
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    website:
      type: string(200)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    contact:
      type: string(60)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    how_to_apply:
      type: string()
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    closing_date:
      type: string(200)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    is_valid:
      type: boolean
      fixed: false
      unsigned: false
      primary: false
      default: '1'
      notnull: true
      autoincrement: false
    sort_date:
      type: date(25)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
Keyword:
  connection: doctrine
  tableName: keyword
  columns:
    id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: true
    keywordtype_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: false
      default: '0'
      notnull: true
      autoincrement: false
    keyword_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: false
      notnull: false
      autoincrement: false
    family:
      type: string(100)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    name:
      type: string(100)
      fixed: false
      unsigned: false
      primary: false
      default: ''
      notnull: true
      autoincrement: false
    description:
      type: string(200)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
  relations:
    Keyword:
      local: id
      foreign: keyword_id
      type: many
    Keywordtype:
      local: keywordtype_id
      foreign: id
      type: one
      onDelete: CASCADE
    Institutes:
      class: Institute
      local: keyword_id
      foreign: institute_id
      refClass: InstituteKeyword
    Persons:
      class: Person
      local: keyword_id
      foreign: person_id
      refClass: PersonKeyword
    Resources:
      class: Resource
      local: keyword_id
      foreign: resource_id
      refClass: ResourceKeyword
Keywordtype:
  connection: doctrine
  tableName: keywordtype
  columns:
    id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: true
    name:
      type: string(30)
      fixed: false
      unsigned: false
      primary: false
      default: ''
      notnull: true
      autoincrement: false
    card_min:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: false
      default: '0'
      notnull: true
      autoincrement: false
    card_max:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: false
      default: '0'
      notnull: true
      autoincrement: false
  relations:
    Keyword:
      local: id
      foreign: keywordtype_id
      type: many
N2dwg:
  connection: doctrine
  tableName: n2dwg
  columns:
    id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: true
    num:
      type: string(3)
      fixed: true
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    name:
      type: string(100)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    description:
      type: string()
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
  relations:
    Sciencecases:
      class: Sciencecase
      local: n2dwg_id
      foreign: sciencecase_id
      refClass: N2dwgSciencecase
    Person:
      local: id
      foreign: n2dwg_id
      type: many
    Persons:
      class: Person
      local: n2dwg_id
      foreign: person_id
      refClass: PersonN2dwg
N2dwgSciencecase:
  connection: doctrine
  tableName: n2dwg_sciencecase
  columns:
    n2dwg_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: false
    sciencecase_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: false
  relations:
    N2dwg:
      local: n2dwg_id
      foreign: id
      type: one
      onDelete: CASCADE
    Sciencecase:
      local: sciencecase_id
      foreign: id
      type: one
      onDelete: CASCADE
Node:
  connection: doctrine
  tableName: node
  columns:
    id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: true
    num:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: false
      notnull: true
      autoincrement: false
    name:
      type: string(60)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    url:
      type: string(150)
      fixed: false
      unsigned: false
      primary: false
      default: 'http://'
      notnull: false
      autoincrement: false
  relations:
    Institute:
      local: id
      foreign: node_id
      type: many
    Pdsnodes:
      class: Pdsnode
      local: node_id
      foreign: pdsnode_id
      refClass: NodePdsnode
    Sciencecases:
      class: Sciencecase
      local: node_id
      foreign: sciencecase_id
      refClass: NodeSciencecase
    Person:
      local: id
      foreign: node_id
      type: many
    Resource:
      local: id
      foreign: node_id
      type: many
    Resources:
      class: Resource
      local: node_id
      foreign: resource_id
      refClass: ResourceNode
    Sciencecase:
      local: id
      foreign: node_id
      type: many
NodePdsnode:
  connection: doctrine
  tableName: node_pdsnode
  columns:
    node_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: false
    pdsnode_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: false
  relations:
    Node:
      local: node_id
      foreign: id
      type: one
      onDelete: CASCADE
    Pdsnode:
      local: pdsnode_id
      foreign: id
      type: one
      onDelete: CASCADE
NodeSciencecase:
  connection: doctrine
  tableName: node_sciencecase
  columns:
    node_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: false
    sciencecase_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: false
  relations:
    Node:
      local: node_id
      foreign: id
      type: one
      onDelete: CASCADE
    Sciencecase:
      local: sciencecase_id
      foreign: id
      type: one
      onDelete: CASCADE
Pdsnode:
  connection: doctrine
  tableName: pdsnode
  columns:
    id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: true
    name:
      type: string(60)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    url:
      type: string(150)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
  relations:
    Nodes:
      class: Node
      local: pdsnode_id
      foreign: node_id
      refClass: NodePdsnode
Person:
  connection: doctrine
  tableName: person
  actAs : { Timestampable: ~ }
  columns:
    id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: true
    institute_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: false
      notnull: false
      autoincrement: false
    institute_other:
      type: string(100)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    n2dwg_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: false
      notnull: false
      autoincrement: false
    node_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: false
      notnull: false
      autoincrement: false
    domain_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: false
      notnull: false
      autoincrement: false
    other_node_thematic:
      type: string(60)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    node_leading_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: false
      notnull: false
      autoincrement: false
    node_leading_status:
      type: enum(10)
      fixed: false
      unsigned: false
      values:
        - scientific
        - technical
      primary: false
      notnull: false
      autoincrement: false
    profile:
      type: enum(11)
      fixed: false
      unsigned: false
      values:
        - normal
        - priviledged
        - admin
        - dev
      primary: false
      default: normal
      notnull: true
      autoincrement: false
    is_enabled:
      type: boolean
      fixed: false
      unsigned: false
      primary: false
      default: '0'
      notnull: true
      autoincrement: false
    is_epn_contact:
      type: boolean
      fixed: false
      unsigned: false
      primary: false
      default: '0'
      notnull: false
      autoincrement: false
    name:
      type: string(30)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    firstname:
      type: string(30)
      fixed: false
      unsigned: false
      primary: false
      default: ''
      notnull: true
      autoincrement: false
    email:
      type: string(60)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    pass:
      type: string(41)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    tel:
      type: string(30)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    fax:
      type: string(30)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    department:
      type: string(100)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    role:
      type: string(60)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    title:
      type: string(50)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    url:
      type: string(200)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    sf_guard_user_id:
      type: integer
  relations:
    User:
      class: sfGuardUser
      foreignType: one
      onDelete: CASCADE
    Domain:
      local: domain_id
      foreign: id
      type: one
      onDelete: SET NULL
    Institute:
      local: institute_id
      foreign: id
      type: one
      onDelete: SET NULL
    N2dwg:
      local: n2dwg_id
      foreign: id
      type: one
      onDelete: SET NULL
    Node:
      local: node_id
      foreign: id
      type: one
      onDelete: SET NULL
    Node_5:
      class: Node
      local: node_leading_id
      foreign: id
      type: one
      onDelete: SET NULL
    Doc:
      local: id
      foreign: person_author_id
      type: many
    Doc_3:
      class: Doc
      local: id
      foreign: person_provider_id
      type: many
    Event:
      local: id
      foreign: person_responsible_id
      type: many
    Events:
      class: Event
      local: person_id
      foreign: event_id
      refClass: EventPerson
    Activities:
      class: Activity
      local: person_id
      foreign: activity_id
      refClass: PersonActivity
    Domains:
      class: Domain
      local: person_id
      foreign: domain_id
      refClass: PersonDomain
    Expertises:
      class: Expertise
      local: person_id
      foreign: expertise_id
      refClass: PersonExpertise
    Keywords:
      class: Keyword
      local: person_id
      foreign: keyword_id
      refClass: PersonKeyword
    N2dwgs:
      class: N2dwg
      local: person_id
      foreign: n2dwg_id
      refClass: PersonN2dwg
    Sciencecases:
      class: Sciencecase
      local: sciencecase_id
      foreign: person_id
      refClass: PersonSciencecase
    Resource:
      local: id
      foreign: person_id
      type: many
    Resource_4:
      class: Resource
      local: id
      foreign: person_contact_id
      type: many
    Resource_5:
      class: Resource
      local: id
      foreign: person_responsible_id
      type: many
    Resource_6:
      class: Resource
      local: id
      foreign: person_updater_id
      type: many
    Task:
      local: id
      foreign: person_id
      type: many
PersonActivity:
  connection: doctrine
  tableName: person_activity
  columns:
    person_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: false
    activity_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: false
    special_status:
      type: enum(18)
      fixed: false
      unsigned: false
      values:
        - Coordinator
        - 'Deputy Coordinator'
        - 'Task Leader'
        - 'Science Manager'
        - 'Technical Manager'
        - Expert
      primary: false
      notnull: false
      autoincrement: false
  relations:
    Person:
      local: person_id
      foreign: id
      type: one
      onDelete: CASCADE
    Activity:
      local: activity_id
      foreign: id
      type: one
      onDelete: CASCADE
PersonDomain:
  connection: doctrine
  tableName: person_domain
  columns:
    person_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: false
    domain_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: false
  relations:
    Person:
      local: person_id
      foreign: id
      type: one
      onDelete: CASCADE
    Domain:
      local: domain_id
      foreign: id
      type: one
      onDelete: CASCADE
PersonExpertise:
  connection: doctrine
  tableName: person_expertise
  columns:
    person_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: false
    expertise_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: false
  relations:
    Person:
      local: person_id
      foreign: id
      type: one
      onDelete: CASCADE
    Expertise:
      local: expertise_id
      foreign: id
      type: one
      onDelete: CASCADE
PersonKeyword:
  connection: doctrine
  tableName: person_keyword
  columns:
    person_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: false
    keyword_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: false
  relations:
    Person:
      local: person_id
      foreign: id
      type: one
      onDelete: CASCADE
    Keyword:
      local: keyword_id
      foreign: id
      type: one
      onDelete: CASCADE
PersonN2dwg:
  connection: doctrine
  tableName: person_n2dwg
  columns:
    person_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: false
    n2dwg_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: false
    special_status:
      type: enum(9)
      fixed: false
      unsigned: false
      values:
        - Leader
        - Co-Leader
      primary: false
      notnull: false
      autoincrement: false
  relations:
    Person:
      local: person_id
      foreign: id
      type: one
      onDelete: CASCADE
    N2dwg:
      local: n2dwg_id
      foreign: id
      type: one
      onDelete: CASCADE
PersonSciencecase:
  connection: doctrine
  tableName: person_sciencecase
  columns:
    person_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: false
    sciencecase_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: false
    special_status:
      type: enum(8)
      fixed: false
      unsigned: false
      values:
        - Proposer
        - Contact
      primary: false
      default: Contact
      notnull: true
      autoincrement: false
  relations:
    Person:
      local: person_id
      foreign: id
      type: one
      onDelete: CASCADE
    Sciencecase:
      local: sciencecase_id
      foreign: id
      type: one
      onDelete: CASCADE
Resource:
  connection: doctrine
  tableName: resource
  actAs : { Timestampable: ~ }
  columns:
    id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: true
    node_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: false
      notnull: true
      autoincrement: false
    resourcetype_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: false
      default: '0'
      notnull: true
      autoincrement: false
    person_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: false
      default: '0'
      notnull: true
      autoincrement: false
    person_updater_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: false
      notnull: false
      autoincrement: false
    person_responsible_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: false
      notnull: false
      autoincrement: false
    person_contact_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: false
      notnull: false
      autoincrement: false
    institute_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: false
      notnull: false
      autoincrement: false
    resource_repository_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: false
      notnull: false
      autoincrement: false
    name:
      type: string(80)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    url:
      type: string(200)
      fixed: false
      unsigned: false
      primary: false
      default: 'http://'
      notnull: true
      autoincrement: false
    is_restricted:
      type: boolean
      fixed: false
      unsigned: false
      primary: false
      default: '0'
      notnull: true
      autoincrement: false
    access_comment:
      type: string()
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    brief:
      type: string(140)
      fixed: false
      unsigned: false
      primary: false
      default: ''
      notnull: true
      autoincrement: false
    description:
      type: string()
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    non_epn_location:
      type: string(130)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    howto:
      type: string()
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    howto_url1:
      type: string(150)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    howto_url2:
      type: string(150)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    howto_url3:
      type: string(150)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    biblio_ref1:
      type: string(150)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    biblio_ref2:
      type: string(150)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    associated_url1:
      type: string(150)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    associated_url2:
      type: string(150)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    associated_url3:
      type: string(150)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    associated_url4:
      type: string(150)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    start_date:
      type: date(25)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    stop_date:
      type: date(25)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    is_english:
      type: boolean
      fixed: false
      unsigned: false
      primary: false
      default: '1'
      notnull: true
      autoincrement: false
    non_english_language:
      type: enum(8)
      fixed: false
      unsigned: false
      values:
        - Chinese
        - Danish
        - Dutch
        - Finnish
        - French
        - German
        - Italian
        - Japanese
        - Spanish
        - Russian
        - Other
      primary: false
      notnull: false
      autoincrement: false
    language:
      type: enum(7)
      fixed: false
      unsigned: false
      values:
        - English
        - French
        - German
        - Italian
        - Spanish
      primary: false
      default: English
      notnull: false
      autoincrement: false
    responsible_name:
      type: string(60)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    responsible_email:
      type: string(60)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    contact_name:
      type: string(60)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    contact_email:
      type: string(60)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    resourceformat_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: false
      notnull: false
      autoincrement: false
    size:
      type: string()
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    process_level:
      type: string()
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    status:
      type: string()
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    format_comment:
      type: string()
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    is_copy:
      type: boolean
      fixed: false
      unsigned: false
      primary: false
      default: '0'
      notnull: true
      autoincrement: false
    associated_url_comment:
      type: string()
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    other_node_thematic:
      type: string(60)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
  relations:
    Institute:
      local: institute_id
      foreign: id
      type: one
      onDelete: SET NULL
    Node:
      local: node_id
      foreign: id
      type: one
      onDelete: CASCADE
    Person:
      local: person_id
      foreign: id
      type: one
      onDelete: CASCADE
    Person_4:
      class: Person
      local: person_contact_id
      foreign: id
      type: one
      onDelete: SET NULL
    Person_5:
      class: Person
      local: person_responsible_id
      foreign: id
      type: one
      onDelete: SET NULL
    Person_6:
      class: Person
      local: person_updater_id
      foreign: id
      type: one
      onDelete: SET NULL
    Resourceformat:
      local: resourceformat_id
      foreign: id
      type: one
      onDelete: SET NULL
    Resourcetype:
      local: resourcetype_id
      foreign: id
      type: one
      onDelete: CASCADE
    Expertises:
      class: Expertise
      local: resource_id
      foreign: expertise_id
      refClass: ResourceExpertise
    Keywords:
      class: Keyword
      local: resource_id
      foreign: keyword_id
      refClass: ResourceKeyword
    Nodes:
      class: Node
      local: resource_id
      foreign: node_id
      refClass: ResourceNode
    Sciencecases:
      class: Sciencecases
      local: resource_id
      foreign: sciencecase_id
      refClass: ResourceSciencecase
ResourceExpertise:
  connection: doctrine
  tableName: resource_expertise
  columns:
    resource_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: false
    expertise_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: false
  relations:
    Resource:
      local: resource_id
      foreign: id
      type: one
      onDelete: CASCADE
    Expertise:
      local: expertise_id
      foreign: id
      type: one
      onDelete: CASCADE
ResourceKeyword:
  connection: doctrine
  tableName: resource_keyword
  columns:
    keyword_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: false
    resource_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: false
  relations:
    Resource:
      local: resource_id
      foreign: id
      type: one
      onDelete: CASCADE
    Keyword:
      local: keyword_id
      foreign: id
      type: one
      onDelete: CASCADE
ResourceNode:
  connection: doctrine
  tableName: resource_node
  columns:
    node_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: false
    resource_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: false
  relations:
    Resource:
      local: resource_id
      foreign: id
      type: one
      onDelete: CASCADE
    Node:
      local: node_id
      foreign: id
      type: one
      onDelete: CASCADE
ResourceSciencecase:
  connection: doctrine
  tableName: resource_sciencecase
  columns:
    resource_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: false
    sciencecase_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: false
  relations:
    Resource:
      local: resource_id
      foreign: id
      type: one
      onDelete: CASCADE
    Sciencecase:
      local: sciencecase_id
      foreign: id
      type: one
      onDelete: CASCADE
Resourceformat:
  connection: doctrine
  tableName: resourceformat
  columns:
    id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: true
    name:
      type: string(30)
      fixed: false
      unsigned: false
      primary: false
      default: ''
      notnull: true
      autoincrement: false
  relations:
    Resource:
      local: id
      foreign: resourceformat_id
      type: many
Resourcetype:
  connection: doctrine
  tableName: resourcetype
  columns:
    id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: true
    name:
      type: string(60)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
  relations:
    Resource:
      local: id
      foreign: resourcetype_id
      type: many
Sciencecase:
  connection: doctrine
  tableName: sciencecase
  columns:
    id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: true
    node_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: false
      notnull: true
      autoincrement: false
    num:
      type: string(5)
      fixed: true
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    name:
      type: string(100)
      fixed: false
      unsigned: false
      primary: false
      default: ''
      notnull: true
      autoincrement: false
    description:
      type: string()
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    url:
      type: string(150)
      fixed: false
      unsigned: false
      primary: false
      default: 'http://'
      notnull: false
      autoincrement: false
  relations:
    Node:
      local: node_id
      foreign: id
      type: one
      onDelete: CASCADE
    N2dwgs:
      class: N2dwg
      local: sciencecase_id
      foreign: n2dwg_id
      refClass: N2dwgSciencecase
    Nodes:
      class: Node
      local: sciencecase_id
      foreign: node_id
      refClass: NodeSciencecase
    Persons:
      class: Person
      local: sciencecase_id
      foreign: person_id
      refClass: PersonSciencecase
    Resources:
      class: Resource
      local: sciencecase_id
      foreign: resource_id
      refClass: ResourceSciencecase
Task:
  connection: doctrine
  tableName: task
  actAs : { Timestampable: ~ }
  columns:
    id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: true
      autoincrement: true
    person_id:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: false
      default: '0'
      notnull: true
      autoincrement: false
    name:
      type: string(60)
      fixed: false
      unsigned: false
      primary: false
      default: ''
      notnull: true
      autoincrement: false
    description:
      type: string()
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    is_public:
      type: boolean
      fixed: false
      unsigned: false
      primary: false
      default: '0'
      notnull: true
      autoincrement: false
    priority:
      type: integer(4)
      fixed: false
      unsigned: true
      primary: false
      default: '1'
      notnull: true
      autoincrement: false
    priority_old:
      type: enum(9)
      fixed: false
      unsigned: false
      values:
        - 'very high'
        - high
        - medium
        - low
        - 'very low'
      primary: false
      default: 'very high'
      notnull: true
      autoincrement: false
    is_done:
      type: boolean
      fixed: false
      unsigned: false
      primary: false
      default: '0'
      notnull: true
      autoincrement: false
    done:
      type: date(25)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    category:
      type: enum(12)
      fixed: false
      unsigned: false
      values:
        - 'bug fix'
        - modification
        - 'new addition'
      primary: false
      default: 'new addition'
      notnull: true
      autoincrement: false
    topic:
      type: enum(9)
      fixed: false
      unsigned: false
      values:
        - framework
        - project
      primary: false
      default: project
      notnull: true
      autoincrement: false
    level:
      type: enum(12)
      fixed: false
      unsigned: false
      values:
        - structure
        - presentation
        - data
      primary: false
      default: structure
      notnull: true
      autoincrement: false
  relations:
    Person:
      local: person_id
      foreign: id
      type: one
      onDelete: CASCADE
Il est généré à partir d'une base de données. Je sais que c'est fortement déconseillé mais c'est une demande exprès de mon tuteur pour qu'il puisse faire ce que je fais pour ce projet sur plusieurs autres projets.
PeytaWodka est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 04/05/2011, 10h45   #10
Modérateur
 
Avatar de Michel Rotta
 
Homme Michel Rotta
Responsable d'exploitation informatique
Inscription : septembre 2005
Messages : 4 913
Détails du profil
Informations personnelles :
Nom : Homme Michel Rotta
Âge : 49
Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

Informations professionnelles :
Activité : Responsable d'exploitation informatique
Secteur : Distribution

Informations forums :
Inscription : septembre 2005
Messages : 4 913
Points : 7 505
Points : 7 505
Je pense que tu as intérêt à nettoyer ton schéma de tous ce qui est par défaut (les propriétés avec false).

A redéfinir tous les liens, a priori, de ce que j'en ai vu, les nom des champs sont conformes à la norme, un lien est alors défini sur une seule des deux tables, par exemple :
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
 
Activity:
  connection: doctrine
  tableName: activity
  columns:
    id:
      type: integer(4)
      unsigned: true
      primary: true
      autoincrement: true
    num:
      type: integer(4)
      unsigned: true
      notnull: true
    activitytype_id:
      type: string(3)
      notnull: true
    ...
  relations:
    Activitytype:
      foreignAlias: Activitys
      onDelete: CASCADE
Les local et foreign sont renseignés par défaut. Le foreignAlias permet de définir le nom de la relation vu par l'autre table. Le nom est ici "Activitys" avec un "s" pour indiquer qu'il retourne une collection et non pas un seul objet.

Je ne sais pas si tu as des liaisons n-n mais il y a des particularités, dans ce cas, précises où et je te donnerais un exemple adapté.

Normalement, tu devrais pouvoir générer une base de données identique à celle prévue initialement avec l'avantage d'avoir un modèle objet qui soit utilisable.

Après, tu as la possibilité de ne générer que le modèle objet a partir du shema.yml adapté et d'utiliser la base de données initiale. Ce qui permet d'avoir un modèle viable sous symfony/doctrine et de conserver la base d'origine. C'est moins simple que de tout créer depuis symfony, mais moins pire que de travailler uniquement sur un shema importé et non conforme aux normes sous symfony/doctrine.

Vois avec ton tuteur si tu peux virer les enum, c'est un truc à éviter comme la peste d'une manière générale.

Il faut ce méfier des clefs composées (PersonActivity) que doctrine gère particulièrement mal, sauf dans le cas où ta table est une table de liaison n-n. Il reste difficile de gérer les arguments pour ces cas là.

Tu as une liaison n-n manifestement entre person et domain dans ce cas les relations deviennent :
Code :
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
 
Person:
  connection: doctrine
  tableName: person
  actAs : { Timestampable: ~ }
  columns:
    id:
      type: integer(4)
      unsigned: true
      primary: true
      autoincrement: true
    ...
  relations:
    Domains:
      class: Domain
      refClass: PersonDomain
      foreignAlias: Persons
 
PersonDomain:
  connection: doctrine
  tableName: person_domain
  columns:
    person_id:
      type: integer(4)
      unsigned: true
      primary: true
    domain_id:
      type: integer(4)
      unsigned: true
      primary: true
  relations:
    Person:
      foreignAlias: PersonDomains
      onDelete: CASCADE
    Domain:
      foreignAlias: PersonDomains
      onDelete: CASCADE
 
Domain:
  ...
Ce qui permet pour un $person de récupérer tous ces domain par même chose depuis un $domain par . A noter le "s" final qui indique dans les deux cas le retour d'une collection.

Dans un DQL la requête pour récupérer les person et leur domain devient alors
Code :
1
2
3
4
 
doctrine_core::createQuery('person p')->
          innerJoin('p.Domains d')->
          ...
ce qui est plus léger à écrire.

A noter que certaine relation (comme celle qui te pose problème avec node_5) ne peuvent être écrites aussi simplement vu que le nom de la relation n'est pas le nom du champ ni celui de la classe en fasse. A mon avis ton problème vient du fait que tu n'as qu'un côté de la relation écrite sans indications miroir vu que tu les écris des deux côtés... Donc, réduite à un côté, ta relation va devenir :
Code :
1
2
3
4
5
6
7
8
9
10
 
Person:
  ...
  relations:
    Node_5:
      class: Node
      local: node_leading_id
      foreign: id
      onDelete: SET NULL
      foreignAlias: Persons
Une fois tout le schéma allégé, cela devrait fonctionner.

Bonne chance
__________________
Si tu donnes un poisson à un homme, il mangera un jour. Si tu lui apprends à pêcher, il mangera toujours (Lao Tseu).
  • Pensez à valoriser les réponses pertinantes, cliquez sur le bouton vert +1 pour indiquer votre accord avec la solution proposée.
  • Pensez à utiliser la balise [code] pour afficher du code, elle est cachée sous le bouton [#] dans l'éditeur.
  • Une discussion est terminée ? Alors le bouton est votre ami !
Michel Rotta est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 04/05/2011, 10h56   #11
Membre habitué
 
Homme Ludovic
Étudiant
Inscription : janvier 2011
Messages : 124
Détails du profil
Informations personnelles :
Nom : Homme Ludovic
Localisation : France

Informations professionnelles :
Activité : Étudiant

Informations forums :
Inscription : janvier 2011
Messages : 124
Points : 140
Points : 140
Je te remercie beaucoup pour tous tes conseils.
Je vais essayer d'en appliquer le maximum seulement voilà, mon tuteur aimerai, à l'avenir, pouvoir rapidement et avec un minimum de modification refaire ce que j'ai fait sur d'autres bases de données donc il me demande de modifier le moins possible ce qui est généré par doctrine. Je veux pas trop lui forcer la main et je sais pas trop comment lui expliquer que de toute façon, même si il veut utiliser le schéma généré par doctrine et dans l’hypothèse que ça fonctionne correctement, il y a quand même énormément de modification à apporter à d'autres endroits.
PeytaWodka est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 04/05/2011, 11h05   #12
Modérateur
 
Avatar de Michel Rotta
 
Homme Michel Rotta
Responsable d'exploitation informatique
Inscription : septembre 2005
Messages : 4 913
Détails du profil
Informations personnelles :
Nom : Homme Michel Rotta
Âge : 49
Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

Informations professionnelles :
Activité : Responsable d'exploitation informatique
Secteur : Distribution

Informations forums :
Inscription : septembre 2005
Messages : 4 913
Points : 7 505
Points : 7 505
Tu peux toujours m'envoyer ton tuteur sur developpez.net...

Même s'il est théoriquement possible de récupérer un shéma.yml à partir d'une base de donnée existante, ce ne peut être qu'un pis allez.

La bonne méthode consiste alors à réécrire le shema.yml récupéré pour l'optimiser (vis a vis du modèle qui sera utilisé) et a générer le modèle (et les form et les filtres) depuis ce schéma optimisé.

L'idéal consiste à créer les tables en se basant sur le modèle (et non pas créer le modèle en se basant sur les tables).

Si non, si c'est juste pour faire de l'édition dans les tables, il y a des outils comme phpMyAdmin qui le font très bien
__________________
Si tu donnes un poisson à un homme, il mangera un jour. Si tu lui apprends à pêcher, il mangera toujours (Lao Tseu).
  • Pensez à valoriser les réponses pertinantes, cliquez sur le bouton vert +1 pour indiquer votre accord avec la solution proposée.
  • Pensez à utiliser la balise [code] pour afficher du code, elle est cachée sous le bouton [#] dans l'éditeur.
  • Une discussion est terminée ? Alors le bouton est votre ami !
Michel Rotta est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 04/05/2011, 11h15   #13
Membre habitué
 
Homme Ludovic
Étudiant
Inscription : janvier 2011
Messages : 124
Détails du profil
Informations personnelles :
Nom : Homme Ludovic
Localisation : France

Informations professionnelles :
Activité : Étudiant

Informations forums :
Inscription : janvier 2011
Messages : 124
Points : 140
Points : 140
Je vais essayer de lui en parler puis je vais lui proposer de lui fournir un document dans lequel je vais réunir toutes les modifications que j'aurai apportée.

Surtout que par exemple, supprimer toutes les lignes par défaut, c'est simple, il suffit de la surligner CTRL + H et 'remplacer tout' par un espace. Rien que cette manip allège énormément le schéma.
PeytaWodka est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 04/05/2011, 13h32   #14
Modérateur
 
Avatar de Michel Rotta
 
Homme Michel Rotta
Responsable d'exploitation informatique
Inscription : septembre 2005
Messages : 4 913
Détails du profil
Informations personnelles :
Nom : Homme Michel Rotta
Âge : 49
Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

Informations professionnelles :
Activité : Responsable d'exploitation informatique
Secteur : Distribution

Informations forums :
Inscription : septembre 2005
Messages : 4 913
Points : 7 505
Points : 7 505
Ca allège le schéma, mais qu'ils y soient ou pas ne change pas le fonctionnement.

Le plus important est la correcte écriture des liens, simple (1-n) et double (n-n) avec des nom et des contrôles qui marchent.

De plus cette méthode fait abstraction des behavior de doctrine, (plugin) qui peuvent rendre d'énormes services.
__________________
Si tu donnes un poisson à un homme, il mangera un jour. Si tu lui apprends à pêcher, il mangera toujours (Lao Tseu).
  • Pensez à valoriser les réponses pertinantes, cliquez sur le bouton vert +1 pour indiquer votre accord avec la solution proposée.
  • Pensez à utiliser la balise [code] pour afficher du code, elle est cachée sous le bouton [#] dans l'éditeur.
  • Une discussion est terminée ? Alors le bouton est votre ami !
Michel Rotta est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 04/05/2011, 14h15   #15
Membre habitué
 
Homme Ludovic
Étudiant
Inscription : janvier 2011
Messages : 124
Détails du profil
Informations personnelles :
Nom : Homme Ludovic
Localisation : France

Informations professionnelles :
Activité : Étudiant

Informations forums :
Inscription : janvier 2011
Messages : 124
Points : 140
Points : 140
Es-ce que tu pense qu'il serai possible de créer un script PHP qui reprendrai tout le schéma par rapport à des conventions qu'on a suivi ? Il existe un objet PHP qui permet de manipuler facilement les fichiers YAML non ?
PeytaWodka est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 04/05/2011, 16h42   #16
Modérateur
 
Avatar de Michel Rotta
 
Homme Michel Rotta
Responsable d'exploitation informatique
Inscription : septembre 2005
Messages : 4 913
Détails du profil
Informations personnelles :
Nom : Homme Michel Rotta
Âge : 49
Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

Informations professionnelles :
Activité : Responsable d'exploitation informatique
Secteur : Distribution

Informations forums :
Inscription : septembre 2005
Messages : 4 913
Points : 7 505
Points : 7 505
Le problème n'est pas là.

En effet, la logique qui dirige l'écriture de la structure d'une base n'est pas la même que celle qui analyse le concept objet des données.

En symfony/doctrine on gère des données représentées par des objets qui sont stocké dans des tables. A la limite, la manière dont ils sont stocké ne nous intéresse pas, c'est les objets et leurs valeurs qui nous intéressent.

La méthode qui part de la base de données pour en déduire un modèle est castratrice au niveau du modèle objet généré vu qu'elle ne voit que la notion de base de données.

Il n'est donc pas possible de créer un outil qui manipule simplement le fichier shema.yml, il faut qu'il y ait "la main du maître" (ou l’œil) pour qu'on puisse y distinguer un schéma conducteur.
__________________
Si tu donnes un poisson à un homme, il mangera un jour. Si tu lui apprends à pêcher, il mangera toujours (Lao Tseu).
  • Pensez à valoriser les réponses pertinantes, cliquez sur le bouton vert +1 pour indiquer votre accord avec la solution proposée.
  • Pensez à utiliser la balise [code] pour afficher du code, elle est cachée sous le bouton [#] dans l'éditeur.
  • Une discussion est terminée ? Alors le bouton est votre ami !
Michel Rotta est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 05/05/2011, 13h33   #17
Membre habitué
 
Homme Ludovic
Étudiant
Inscription : janvier 2011
Messages : 124
Détails du profil
Informations personnelles :
Nom : Homme Ludovic
Localisation : France

Informations professionnelles :
Activité : Étudiant

Informations forums :
Inscription : janvier 2011
Messages : 124
Points : 140
Points : 140
J'ouvre une nouvelle discussion parce que j'ai plusieurs questions.
PeytaWodka est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité Cette discussion est résolue.
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 09h22.


 
 
 
 
Partenaires

Hébergement Web