Guest User

Untitled

a guest
Aug 30th, 2018
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  1. symfony foreign key one-to-many
  2. Dispositivi:
  3. connection: doctrine
  4. tableName: dispositivi
  5. columns:
  6. id_dispositivo:
  7. type: integer(4)
  8. fixed: false
  9. unsigned: false
  10. primary: true
  11. autoincrement: true
  12. device_id:
  13. type: string(255)
  14. fixed: false
  15. unsigned: false
  16. primary: false
  17. notnull: true
  18. autoincrement: false
  19. tipo:
  20. type: string(255)
  21. fixed: false
  22. unsigned: false
  23. primary: false
  24. notnull: true
  25. autoincrement: false
  26. utente_fk:
  27. type: integer(4)
  28. fixed: false
  29. unsigned: false
  30. primary: false
  31. notnull: true
  32. autoincrement: false
  33. relations:
  34. Utenti:
  35. local: utente_fk
  36. foreign: id_utente
  37. type: one
  38. Utenti:
  39. connection: doctrine
  40. tableName: utenti
  41. columns:
  42. id_utente:
  43. type: integer(4)
  44. fixed: false
  45. unsigned: false
  46. primary: true
  47. autoincrement: true
  48. username:
  49. type: string(255)
  50. fixed: false
  51. unsigned: false
  52. primary: false
  53. notnull: true
  54. autoincrement: false
  55. password:
  56. type: string(255)
  57. fixed: false
  58. unsigned: false
  59. primary: false
  60. notnull: true
  61. autoincrement: false
  62. tipo:
  63. type: string(255)
  64. fixed: false
  65. unsigned: false
  66. primary: false
  67. notnull: true
  68. autoincrement: false
  69. relations:
  70. Dispositivi:
  71. local: id_utente
  72. foreign: utente_fk
  73. type: many
  74. Servizi:
  75. local: id_utente
  76. foreign: utente_fk
  77. type: many
  78.  
  79. <?php
  80. $dispositivis = $utente->Dispositivis;
  81. ?>
  82.  
  83. <?php foreach ($dispositivis as $d): ?>
  84. <?php echo link_to($d->getTipo(), 'module_name/action_name?id='. $d->getIdDispositivo()) ?><br />
  85. <?php endforeach ?>
Add Comment
Please, Sign In to add comment