Advertisement
Guest User

Untitled

a guest
Mar 15th, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. detect_relations: true
  2. User:
  3. actAs:
  4. Timestampable:
  5. SoftDelete:
  6. Sluggable:
  7. unique: true
  8. fields: [name]
  9. canUpdate: true
  10. tableName: user
  11. columns:
  12. name:
  13. type: string(50)
  14. notnull: true
  15. email:
  16. type: string(50)
  17. notnull: true
  18. unique: true
  19. password:
  20. type: string(50)
  21. notnull: true
  22. business_id: integer
  23. relations:
  24. Business:
  25. cascade: [delete]
  26. Business:
  27. actAs:
  28. Timestampable:
  29. SoftDelete:
  30. Sluggable:
  31. unique: true
  32. fields: [name]
  33. canUpdate: true
  34. tableName: business
  35. columns:
  36. name:
  37. type: string(50)
  38. notnull: true
  39. website: string(100)
  40. address: string(100)
  41.  
  42. $q = Doctrine_Query::create()
  43. ->delete('Model_User u')
  44. ->where('u.id = ?', $id);
  45. $q ->execute();
  46.  
  47. $user = Doctrine_Core::getTable('User')->find(1)
  48. $user->delete();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement