{"action":"created","issue":{"url":"https://api.github.com/repos/elixir-lang/ecto/issues/655","labels_url":"https://api.github.com/repos/elixir-lang/ecto/issues/655/labels{/name}","comments_url":"https://api.github.com/repos/elixir-lang/ecto/issues/655/comments","events_url":"https://api.github.com/repos/elixir-lang/ecto/issues/655/events","html_url":"https://github.com/elixir-lang/ecto/issues/655","id":87465199,"number":655,"title":"Support options dependent: :destroy in Schema's has_many and belongs_to","user":{"login":"foxnewsnetwork","id":1010423,"avatar_url":"https://avatars.githubusercontent.com/u/1010423?v=3","gravatar_id":"","url":"https://api.github.com/users/foxnewsnetwork","html_url":"https://github.com/foxnewsnetwork","followers_url":"https://api.github.com/users/foxnewsnetwork/followers","following_url":"https://api.github.com/users/foxnewsnetwork/following{/other_user}","gists_url":"https://api.github.com/users/foxnewsnetwork/gists{/gist_id}","starred_url":"https://api.github.com/users/foxnewsnetwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foxnewsnetwork/subscriptions","organizations_url":"https://api.github.com/users/foxnewsnetwork/orgs","repos_url":"https://api.github.com/users/foxnewsnetwork/repos","events_url":"https://api.github.com/users/foxnewsnetwork/events{/privacy}","received_events_url":"https://api.github.com/users/foxnewsnetwork/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2015-06-11T19:24:23Z","updated_at":"2015-06-28T14:12:16Z","closed_at":null,"body":"Ecto has a lot of influences from ActiveRecord, and one of the handiest things ActiveRecord had was:\r\n\r\n```ruby\r\nclass School\r\n  has_many :students, dependent: :destroy\r\nend\r\n```\r\nwhich provided a good and conventional way of deleting all the `students` after the `school` is destroyed. It would be great if we could also have this feature in Ecto's `has_many` (and `belongs_to`) macros\r\n\r\nAs per @josevalim 's instructions from this thread in the google group:\r\nhttps://groups.google.com/forum/#!topic/elixir-ecto/RLJ3f3yETdQ\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/elixir-lang/ecto/issues/comments/116285716","html_url":"https://github.com/elixir-lang/ecto/issues/655#issuecomment-116285716","issue_url":"https://api.github.com/repos/elixir-lang/ecto/issues/655","id":116285716,"user":{"login":"gjaldon","id":1457730,"avatar_url":"https://avatars.githubusercontent.com/u/1457730?v=3","gravatar_id":"","url":"https://api.github.com/users/gjaldon","html_url":"https://github.com/gjaldon","followers_url":"https://api.github.com/users/gjaldon/followers","following_url":"https://api.github.com/users/gjaldon/following{/other_user}","gists_url":"https://api.github.com/users/gjaldon/gists{/gist_id}","starred_url":"https://api.github.com/users/gjaldon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gjaldon/subscriptions","organizations_url":"https://api.github.com/users/gjaldon/orgs","repos_url":"https://api.github.com/users/gjaldon/repos","events_url":"https://api.github.com/users/gjaldon/events{/privacy}","received_events_url":"https://api.github.com/users/gjaldon/received_events","type":"User","site_admin":false},"created_at":"2015-06-28T14:12:16Z","updated_at":"2015-06-28T14:12:16Z","body":"@josevalim thanks for the update! Will finish this up within the next few days :)"}}