{"action":"created","issue":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/5949","labels_url":"https://api.github.com/repos/cakephp/cakephp/issues/5949/labels{/name}","comments_url":"https://api.github.com/repos/cakephp/cakephp/issues/5949/comments","events_url":"https://api.github.com/repos/cakephp/cakephp/issues/5949/events","html_url":"https://github.com/cakephp/cakephp/issues/5949","id":58585186,"number":5949,"title":"Quoting not working for SQL Server","user":{"login":"stmeyer","id":10654545,"avatar_url":"https://avatars.githubusercontent.com/u/10654545?v=3","gravatar_id":"","url":"https://api.github.com/users/stmeyer","html_url":"https://github.com/stmeyer","followers_url":"https://api.github.com/users/stmeyer/followers","following_url":"https://api.github.com/users/stmeyer/following{/other_user}","gists_url":"https://api.github.com/users/stmeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/stmeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stmeyer/subscriptions","organizations_url":"https://api.github.com/users/stmeyer/orgs","repos_url":"https://api.github.com/users/stmeyer/repos","events_url":"https://api.github.com/users/stmeyer/events{/privacy}","received_events_url":"https://api.github.com/users/stmeyer/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cakephp/cakephp/labels/Defect","name":"Defect","color":"f7c6c7"},{"url":"https://api.github.com/repos/cakephp/cakephp/labels/On%20hold","name":"On hold","color":"eb6420"},{"url":"https://api.github.com/repos/cakephp/cakephp/labels/sqlserver","name":"sqlserver","color":"FFFFFF"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/cakephp/cakephp/milestones/7","labels_url":"https://api.github.com/repos/cakephp/cakephp/milestones/7/labels","id":453043,"number":7,"title":"3.0.0","description":"New major release that breaks compatibility with 2.x\r\n\r\n- PHP5.4.19+\r\n- New ORM & behaviors.\r\n- Improved Routing\r\n- PSR-0 and composer support.\r\n- Simpler configuration and bootstrapping.\r\n- Improved configuration handling.\r\n- Improved bake.\r\n\r\nSee [the roadmap](http://github.com/cakephp/cakephp/wiki/3.0-roadmap) for more details.","creator":{"login":"lh-import","id":5175817,"avatar_url":"https://avatars.githubusercontent.com/u/5175817?v=3","gravatar_id":"","url":"https://api.github.com/users/lh-import","html_url":"https://github.com/lh-import","followers_url":"https://api.github.com/users/lh-import/followers","following_url":"https://api.github.com/users/lh-import/following{/other_user}","gists_url":"https://api.github.com/users/lh-import/gists{/gist_id}","starred_url":"https://api.github.com/users/lh-import/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lh-import/subscriptions","organizations_url":"https://api.github.com/users/lh-import/orgs","repos_url":"https://api.github.com/users/lh-import/repos","events_url":"https://api.github.com/users/lh-import/events{/privacy}","received_events_url":"https://api.github.com/users/lh-import/received_events","type":"User","site_admin":false},"open_issues":19,"closed_issues":2349,"state":"open","created_at":"2013-10-11T20:56:23Z","updated_at":"2015-02-24T02:01:29Z","due_on":"2015-03-22T04:00:00Z","closed_at":null},"comments":5,"created_at":"2015-02-23T13:28:41Z","updated_at":"2015-02-24T07:39:57Z","closed_at":null,"body":"Hello,\r\n\r\ni have enabled Quoting for Microsoft SQL Server, and \"bake\" the Model, Controller and Templates for a Database Table \"User\". When updating or inserting a dataset, i get an error \"Wrong syntax at user-keyword\". But showing all users, a single user and delete a user is working.\r\n\r\nBest regards"},"comment":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/comments/75712057","html_url":"https://github.com/cakephp/cakephp/issues/5949#issuecomment-75712057","issue_url":"https://api.github.com/repos/cakephp/cakephp/issues/5949","id":75712057,"user":{"login":"stmeyer","id":10654545,"avatar_url":"https://avatars.githubusercontent.com/u/10654545?v=3","gravatar_id":"","url":"https://api.github.com/users/stmeyer","html_url":"https://github.com/stmeyer","followers_url":"https://api.github.com/users/stmeyer/followers","following_url":"https://api.github.com/users/stmeyer/following{/other_user}","gists_url":"https://api.github.com/users/stmeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/stmeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stmeyer/subscriptions","organizations_url":"https://api.github.com/users/stmeyer/orgs","repos_url":"https://api.github.com/users/stmeyer/repos","events_url":"https://api.github.com/users/stmeyer/events{/privacy}","received_events_url":"https://api.github.com/users/stmeyer/received_events","type":"User","site_admin":false},"created_at":"2015-02-24T07:39:57Z","updated_at":"2015-02-24T07:39:57Z","body":"The database table is:\r\n```sql\r\nCREATE TABLE [dbo].[User](\r\n\t[ID] [int] IDENTITY(1,1) NOT NULL,\r\n\t[FirstName] [nvarchar](100) NULL,\r\n\t[SurName] [nvarchar](100) NULL,\r\n\t[LoginName] [varchar](100) NULL,\r\n\t[Password] [varchar](64) NULL,\r\n\t[Email] [varchar](100) NULL,\r\n\t[DateCreate] [datetime] NULL,\r\n\t[DateLastVisit] [datetime] NULL\r\n CONSTRAINT [PKUser] PRIMARY KEY CLUSTERED \r\n(\r\n\t[ID] ASC\r\n)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]\r\n) ON [PRIMARY]\r\n```\r\nThen i bake everything for the table:\r\n```\r\ncake.bat bake model user\r\ncake.bat bake controller user\r\ncake.bat bake template user\r\n```\r\nAfter this, i visit https://url.tld/user/add and fill out all field. By saving, the executed query object is:\r\n```\r\nobject(Cake\\ORM\\Query) {\r\n\r\n\t'sql' => 'INSERT INTO [user] ([FirstName], [SurName], [LoginName], [Password], [Email], [DateCreate], [DateLastVisit]) OUTPUT INSERTED.* VALUES (:c0, :c1, :c2, :c3, :c4, :c5, :c6)',\r\n\t'params' => [\r\n\t\t':c0' => [\r\n\t\t\t'value' => 'test',\r\n\t\t\t'type' => 'string',\r\n\t\t\t'placeholder' => 'c0'\r\n\t\t],\r\n\t\t':c1' => [\r\n\t\t\t'value' => 'test',\r\n\t\t\t'type' => 'string',\r\n\t\t\t'placeholder' => 'c1'\r\n\t\t],\r\n\t\t':c2' => [\r\n\t\t\t'value' => 'test',\r\n\t\t\t'type' => 'string',\r\n\t\t\t'placeholder' => 'c2'\r\n\t\t],\r\n\t\t':c3' => [\r\n\t\t\t'value' => 'test',\r\n\t\t\t'type' => 'string',\r\n\t\t\t'placeholder' => 'c3'\r\n\t\t],\r\n\t\t':c4' => [\r\n\t\t\t'value' => 'test@mail.com',\r\n\t\t\t'type' => 'string',\r\n\t\t\t'placeholder' => 'c4'\r\n\t\t],\r\n\t\t':c5' => [\r\n\t\t\t'value' => object(Cake\\I18n\\Time) {},\r\n\t\t\t'type' => 'timestamp',\r\n\t\t\t'placeholder' => 'c5'\r\n\t\t],\r\n\t\t':c6' => [\r\n\t\t\t'value' => object(Cake\\I18n\\Time) {},\r\n\t\t\t'type' => 'timestamp',\r\n\t\t\t'placeholder' => 'c6'\r\n\t\t]\r\n\t],\r\n\t'defaultTypes' => [\r\n\t\t'User.ID' => 'integer',\r\n\t\t'ID' => 'integer',\r\n\t\t'User.FirstName' => 'string',\r\n\t\t'FirstName' => 'string',\r\n\t\t'User.SurName' => 'string',\r\n\t\t'SurName' => 'string',\r\n\t\t'User.LoginName' => 'string',\r\n\t\t'LoginName' => 'string',\r\n\t\t'User.Password' => 'string',\r\n\t\t'Password' => 'string',\r\n\t\t'User.Email' => 'string',\r\n\t\t'Email' => 'string',\r\n\t\t'User.DateCreate' => 'timestamp',\r\n\t\t'DateCreate' => 'timestamp',\r\n\t\t'User.DateLastVisit' => 'timestamp',\r\n\t\t'DateLastVisit' => 'timestamp'\r\n\t],\r\n\t'decorators' => (int) 0,\r\n\t'executed' => false,\r\n\t'hydrate' => true,\r\n\t'buffered' => true,\r\n\t'formatters' => (int) 0,\r\n\t'mapReducers' => (int) 0,\r\n\t'contain' => [],\r\n\t'matching' => [],\r\n\t'extraOptions' => [],\r\n\t'repository' => object(App\\Model\\Table\\UserTable) {\r\n\r\n\t\t'registryAlias' => 'User',\r\n\t\t'table' => 'user',\r\n\t\t'alias' => 'User',\r\n\t\t'entityClass' => 'App\\Model\\Entity\\User',\r\n\t\t'associations' => [[maximum depth reached]],\r\n\t\t'behaviors' => [[maximum depth reached]],\r\n\t\t'defaultConnection' => 'default',\r\n\t\t'connectionName' => 'default'\r\n\t\r\n\t}\r\n\r\n}\r\n```\r\nIs it possible, that DateTime-Columns habe to the a PHP-DateTime-Object, like described in  https://msdn.microsoft.com/en-us/library/cc296193%28v=sql.105%29.aspx\r\n@markstory it is currently not possible to rename the user table. 'quoteIdentifiers' is enabled"}}