{"action":"created","issue":{"url":"https://api.github.com/repos/phalcon/cphalcon/issues/3080","labels_url":"https://api.github.com/repos/phalcon/cphalcon/issues/3080/labels{/name}","comments_url":"https://api.github.com/repos/phalcon/cphalcon/issues/3080/comments","events_url":"https://api.github.com/repos/phalcon/cphalcon/issues/3080/events","html_url":"https://github.com/phalcon/cphalcon/issues/3080","id":50184887,"number":3080,"title":"ConstraintViolation ","user":{"login":"karborator","id":5076985,"avatar_url":"https://avatars.githubusercontent.com/u/5076985?v=3","gravatar_id":"","url":"https://api.github.com/users/karborator","html_url":"https://github.com/karborator","followers_url":"https://api.github.com/users/karborator/followers","following_url":"https://api.github.com/users/karborator/following{/other_user}","gists_url":"https://api.github.com/users/karborator/gists{/gist_id}","starred_url":"https://api.github.com/users/karborator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karborator/subscriptions","organizations_url":"https://api.github.com/users/karborator/orgs","repos_url":"https://api.github.com/users/karborator/repos","events_url":"https://api.github.com/users/karborator/events{/privacy}","received_events_url":"https://api.github.com/users/karborator/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/phalcon/cphalcon/labels/Need%20script%20to%20reproduce","name":"Need script to reproduce","color":"fad8c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-11-26T14:27:51Z","updated_at":"2015-07-17T01:23:14Z","closed_at":null,"body":"When i try to implement soft delete on model with relation hasOne i get this error:\r\n\r\nobject(Phalcon\\Mvc\\Model\\Message)[132]\r\n  protected '_type' => string 'ConstraintViolation' (length=19)\r\n  protected '_message' => string 'Record is referenced by model \\Modules\\Admin\\Models\\Options\\EndpointType' (length=72)\r\n  protected '_field' => string 'endpoint_type' (length=13)\r\n  protected '_model' => null\r\n  protected '_code' => int 0\r\n\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/6548350-constraintviolation?utm_campaign=plugin&utm_content=tracker%2F50707&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F50707&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/phalcon/cphalcon/issues/comments/122143223","html_url":"https://github.com/phalcon/cphalcon/issues/3080#issuecomment-122143223","issue_url":"https://api.github.com/repos/phalcon/cphalcon/issues/3080","id":122143223,"user":{"login":"andresgutierrez","id":213590,"avatar_url":"https://avatars.githubusercontent.com/u/213590?v=3","gravatar_id":"","url":"https://api.github.com/users/andresgutierrez","html_url":"https://github.com/andresgutierrez","followers_url":"https://api.github.com/users/andresgutierrez/followers","following_url":"https://api.github.com/users/andresgutierrez/following{/other_user}","gists_url":"https://api.github.com/users/andresgutierrez/gists{/gist_id}","starred_url":"https://api.github.com/users/andresgutierrez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andresgutierrez/subscriptions","organizations_url":"https://api.github.com/users/andresgutierrez/orgs","repos_url":"https://api.github.com/users/andresgutierrez/repos","events_url":"https://api.github.com/users/andresgutierrez/events{/privacy}","received_events_url":"https://api.github.com/users/andresgutierrez/received_events","type":"User","site_admin":false},"created_at":"2015-07-17T01:23:14Z","updated_at":"2015-07-17T01:23:14Z","body":"Could you please provide the script to reproduce this issue?"}}