Symfony -> how to rebuild lost foreign keys during data-load


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. company:
  2. _attributes: { phpName: Company }
  3. id: { type: INTEGER, primaryKey: true, autoIncrement: true, required: true }
  4. name: { type: VARCHAR, size: 255, required: true }
  5. contact_id: { type: INTEGER, required: false }
  6. _foreignKeys:
  7. -
  8. foreignTable: contact
  9. onDelete: SET NULL
  10. references:
  11. - { local: contact_id, foreign: id }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.