Bonjour à tous !

j'ai un léger soucis au niveau de mes fixtures.

Suite à un data-dump via symfony qui m'a généré un fichier de fixture qu'il n'arrivait pas à reprendre en entrée pour re-créer la base (), j'ai remodifié le fichier pour qu'il le comprenne.

mais j'ai un petit soucis :

Dans une même table, j'ai deux champs qui pointe vers une même table, un id d'un gestionnaire local et un id d'un gestionnaire national qui sont tous deux des "Personne".



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
#Call for proposal
 
AppelAProjet:
  tableName: Appel_a_projet
  columns:
    nomAppel:
      type: string(255)
      notnull: true
    dateAppel:
      type: date(25)
      notnull: true
    dateFin:
      type: date(25)
      unsigned: true
      notnull: true
    Gestionnaire_nat_id:
      type: integer(8)
      notnull: true
    Gestionnaire_centre_id:
      type: integer(8)
      notnull: true
  relations:
    Personne:
      class: Personne
      local: Gestionnaire_centre_id
      foreignAlias: AppelAProjetsGCenter
    Personne:
      class: Personne
      local: Gestionnaire_nat_id
      foreignAlias: AppelAProjetsGNat
    ContratsLies:
      class: Formelle
      local: contrat_id
      type: many
      foreignAlias: AppelAProjetsFormelle
 
Personne:
  tableName: Personne
  columns:
    nompersonne:
      type: string(255)
      notnull: true
    nom2personne:
      type: string(255)
    prenompersonne:
      type: string(255)
      notnull: true
    prenom2personne:
      type: string(255)
    emailpersonne:
      type: string(255)
    sexepersonne:
      type: string(255)
      notnull: true
    institution_id:
      type: integer(8)
      notnull: trueq
    statut_personne:
      type: string(255)
      notnull: true
  relations:
    Institution:
      foreignAlias: Personnes
    Sexe:
      class: Sexe
      local: sexepersonne
      foreign: sexe
      foreignAlias: Personnes
    Libelle_statut_personne:
      class: Libelle_statut_personne
      local: statut_personne
      foreign: nom_statut
      foreignAlias: Personnes
 
Sexe:
  tableName: Sexe
  columns:
#Oui, un id de table de type String, c'est laid, je le sais....
    sexe:
      type: string(255)
      primary: true
et mes fixtures :
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
 
AppelAProjet:
  AppelAProjet_1:
    nomAppel: 'Associate Team 11'
    dateAppel: '2011-07-13'
    dateFin: '2011-09-30'
    Personne: Personne_3
    Personne: Personne_6
  AppelAProjet_2:
    nomAppel: 'Associate Team 10'
    dateAppel: '2010-07-15'
    dateFin: '2010-09-30'
    Personne: Personne_5
    Personne: Personne_7
 
Personne:
  Personne_3:
    nompersonne: P******t
    prenompersonne: S*****e
    emailpersonne: p****t@*****.fr
    Sexe: Sexe_F
    Institution: Institution_1
    Libelle_statut_personne: Libelle_statut_personne_Professor
  Personne_6:
    nompersonne: V*****
    prenompersonne: V******e
    emailpersonne: v******e.v******@******.fr
    Sexe: Sexe_F
    Institution: Institution_3
    Libelle_statut_personne: Libelle_statut_personne_Professor
  Personne_7:
    nompersonne: Pl******
    prenompersonne: E******
    emailpersonne: e******.p******@******.fr
    Sexe: Sexe_F
    Institution: Institution_6
    Libelle_statut_personne: Libelle_statut_personne_Professor
Donc au final, il ne me met qu'une des deux "Personne" dans le champ "Gestionnaire national id" et rien dans le champ "gestionnaire Local id"...