{"action":"closed","issue":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/10773","repository_url":"https://api.github.com/repos/yiisoft/yii2","labels_url":"https://api.github.com/repos/yiisoft/yii2/issues/10773/labels{/name}","comments_url":"https://api.github.com/repos/yiisoft/yii2/issues/10773/comments","events_url":"https://api.github.com/repos/yiisoft/yii2/issues/10773/events","html_url":"https://github.com/yiisoft/yii2/issues/10773","id":131907183,"number":10773,"title":"Problems Deleting Related Records Where the Relation is Created via UUID field","user":{"login":"chitwarnold","id":1483375,"avatar_url":"https://avatars.githubusercontent.com/u/1483375?v=3","gravatar_id":"","url":"https://api.github.com/users/chitwarnold","html_url":"https://github.com/chitwarnold","followers_url":"https://api.github.com/users/chitwarnold/followers","following_url":"https://api.github.com/users/chitwarnold/following{/other_user}","gists_url":"https://api.github.com/users/chitwarnold/gists{/gist_id}","starred_url":"https://api.github.com/users/chitwarnold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chitwarnold/subscriptions","organizations_url":"https://api.github.com/users/chitwarnold/orgs","repos_url":"https://api.github.com/users/chitwarnold/repos","events_url":"https://api.github.com/users/chitwarnold/events{/privacy}","received_events_url":"https://api.github.com/users/chitwarnold/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/yiisoft/yii2/labels/PostgreSQL","name":"PostgreSQL","color":"006b75"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-02-06T22:44:29Z","updated_at":"2016-02-07T00:16:39Z","closed_at":"2016-02-07T00:16:39Z","body":"Hi I am using UUID's in my application to ensure uniqueness of records, when they are ported. My problems originate from trying to delete related records. the Relationship was created via the uuid columns. Yii 2, seems to read the relations well on all CRUDS(search) except on the Deletion of Related Records where i get this type ot err\r\n\r\n`SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near \"bb3c42\"\r\nLINE 1: ... FROM \"pm\".\"project_sites\" WHERE project_code = 64bb3c42-c31...\r\n^\r\nThe SQL being executed was: DELETE FROM \"pm\".\"project_sites\" WHERE project_code = 64bb3c42-c31d-439d-ac22-1b0fca6a9e83\r\n\r\nError Info: Array\r\n(\r\n    [0] => 42601\r\n    [1] => 7\r\n    [2] => ERROR:  syntax error at or near \"bb3c42\"\r\nLINE 1: ... FROM \"pm\".\"project_sites\" WHERE project_code = 64bb3c42-c31...`\r\n\r\nSince the UUID begins with a  number for some reason, it assumes the entire parameter is an integers/number and the query fails on the first instance of an alphabet.\r\n\r\n\r\nMy Environment  includes\r\n\r\n- Linux Ubuntu 14.04 LTS, PHP 5.6, PostgreSQL 9.4 , Yii 2 Advanced Template\r\n\r\n@samdark @cebe @qiangxue and others  please help"}}