Je m'attaque au backend d'un projet, et grâce à Symfony, je génère mes modules via "l'admin generator".
Tout se passe bien, j'ai toutes les listes, les formulaires etc.

Cependant, dans mon formulaire de création j'ai 3 champs cachés:
  • csrf_token
  • ma clé primaire
  • une clé étrangère


Pour les deux premiers je comprends bien qu'ils soient cachés. Cependant pour ma clé étrangère ... j'aimerais bien qu'elle soit visible et mettre une liste déroulante.

Voici mon schema.yml pour la table correspondante:

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
 
Labels:
  actAs: [ Timestampable, SoftDelete ]
  tableName: labels
  columns:
    id:
      type: integer
      fixed: false
      unsigned: false
      primary: true
      autoincrement: true
    sports_id:
      type: integer
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    champs1:
      type: string(255)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    champs2:
      type: string(255)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    champs3:
      type: string(255)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    champs4:
      type: string(255)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    champs5:
      type: string(255)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
  relations:
    Sports:
      local: sports_id
      foreign: id
      type: one
Une idée ? Mon schéma est-il faux ?

Merci