Advertisement
Guest User

Untitled

a guest
Jul 11th, 2017
506
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.00 KB | None | 0 0
  1. //erreur lors du chargement des fixtures
  2.  
  3. SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`staystory_local`.`it_ss_employee_edifice`, CONSTRAINT `it_ss_employee_edifice_it_ss_employee_id_it_ss_edifice_id` FOREIGN KEY (`it_ss_employee_id`) REFERENCES `it_ss_edifice` (`id`))
  4.  
  5.  
  6.  
  7. // mes fixtures
  8.  
  9. ItSsHotel:
  10. ItSsHotel_1:
  11. Partner: ItSsPartner_1
  12. name: 'Hotel Test 1'
  13. story: 'The amazing story of the Hotel 1'
  14. practical_information: 'The practical informations of the Hotel 1'
  15. Address: ItSsAddress_2
  16. type: hotel
  17. is_historic: false
  18.  
  19. ItSsMonument:
  20. ItSsMonument_2:
  21. Partner: ItSsPartner_1
  22. name: 'Monument Test 1'
  23. story: 'The amazing story of the Monument Test 1'
  24. practical_information: 'The practical informations of the Monument Test 1'
  25. Address: ItSsAddress_3
  26. type: monument
  27. is_historic: false
  28.  
  29.  
  30. ItSsEmployee:
  31. ItSsEmployee_2:
  32. username: employee1
  33. email: serard@serard.com
  34. algorithm: sha1
  35. salt: e108223e38e4ad7ebe04c34594640c4c
  36. password: e25f37e1951148987b85e44a57809244549ed645
  37. is_active: true
  38. is_super_admin: false
  39. last_login: null
  40. forgot_password_code: null
  41. type: employee
  42. created_at: '2011-01-13 14:24:33'
  43. updated_at: '2011-01-13 14:24:33'
  44. EmployeeOfEdifices:
  45. - ItSsMonument_2
  46. - ItSsHotel_1
  47.  
  48.  
  49. //model:
  50.  
  51. ItSsEmployee:
  52. inheritance:
  53. extends: ItSsUser
  54. type: column_aggregation
  55. keyField: type
  56. keyValue: employee
  57. relations:
  58. EmployeeOfEdifices:
  59. class: ItSsEdifice
  60. local: it_ss_employee_id
  61. foreign: it_ss_edifice_id
  62. refClass: ItSsEmployeeEdifice
  63. foreignAlias: Employees
  64.  
  65. ItSsEmployeeEdifice:
  66. options:
  67. symfony:
  68. form: false
  69. filter: false
  70. columns:
  71. it_ss_edifice_id: {type: integer(11), notnull: true}
  72. it_ss_employee_id: {type: integer(11), notnull: true}
  73. relations:
  74. Employee:
  75. class: ItSsEmployee
  76. local: it_ss_edifice_id
  77. Edifice:
  78. class: ItSsEdifice
  79. local: it_ss_employee_id
  80.  
  81. ItSsEdifice:
  82. actAs:
  83. DmVersionable: ~
  84. DmBlameable: ~
  85. Timestampable: ~
  86. columns:
  87. # 'type' must be used as keyField in order to inherit this class
  88. it_ss_partner_id: {type: integer(11), notnull: true, extra: paginated}
  89. name: {type: string(255), notnull: true}
  90. story: {type: clob, extra: markdown}
  91. practical_information: {type: clob, extra: markdown}
  92. it_ss_address_id: {type: integer(11), notnull: true}
  93. relations:
  94. Employees:
  95. class: ItSsEmployee
  96. local: it_ss_edifice_id
  97. foreign: it_ss_employee_id
  98. refClass: ItSsEmployeeEdifice
  99. foreignAlias: EmployeeOfEdifices
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement