{"action":"created","issue":{"url":"https://api.github.com/repos/balderdashy/sails-postgresql/issues/155","labels_url":"https://api.github.com/repos/balderdashy/sails-postgresql/issues/155/labels{/name}","comments_url":"https://api.github.com/repos/balderdashy/sails-postgresql/issues/155/comments","events_url":"https://api.github.com/repos/balderdashy/sails-postgresql/issues/155/events","html_url":"https://github.com/balderdashy/sails-postgresql/issues/155","id":71107047,"number":155,"title":"creating record with a json attribute type fails","user":{"login":"orthodoc","id":302414,"avatar_url":"https://avatars.githubusercontent.com/u/302414?v=3","gravatar_id":"","url":"https://api.github.com/users/orthodoc","html_url":"https://github.com/orthodoc","followers_url":"https://api.github.com/users/orthodoc/followers","following_url":"https://api.github.com/users/orthodoc/following{/other_user}","gists_url":"https://api.github.com/users/orthodoc/gists{/gist_id}","starred_url":"https://api.github.com/users/orthodoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orthodoc/subscriptions","organizations_url":"https://api.github.com/users/orthodoc/orgs","repos_url":"https://api.github.com/users/orthodoc/repos","events_url":"https://api.github.com/users/orthodoc/events{/privacy}","received_events_url":"https://api.github.com/users/orthodoc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-26T19:11:37Z","updated_at":"2015-04-26T19:52:03Z","closed_at":null,"body":"model User.js\r\n```\r\nmodule.exports = {\r\n  username: { type: 'string', unique: true },\r\n  password: { type: 'string' },\r\n  ....\r\n  socialProfiles: { type: 'json', defaultsTo: {} },\r\n}\r\n```\r\nReturns the following error:\r\n```\r\n{ code: 'E_INTERNAL_SERVER_ERROR',\r\n  message: 'Something bad happened on the server',\r\n  data: \r\n   Error (E_UNKNOWN) :: Encountered an unexpected error\r\n   error: column user.socialProfiles.facebook.id does not exist\r\n       at Connection.parseE (/home/bdb/sails/diagnox/node_modules/sails-postgresql/node_modules/pg/lib/connection.js:534:11)\r\n       at Connection.parseMessage (/home/bdb/sails/diagnox/node_modules/sails-postgresql/node_modules/pg/lib/connection.js:361:17)\r\n       at Socket.<anonymous> (/home/bdb/sails/diagnox/node_modules/sails-postgresql/node_modules/pg/lib/connection.js:105:22)\r\n       at Socket.emit (events.js:107:17)\r\n       at readableAddChunk (_stream_readable.js:163:16)\r\n       at Socket.Readable.push (_stream_readable.js:126:10)\r\n       at TCP.onread (net.js:529:20)\r\n   \r\n   Details:  error: column user.socialProfiles.facebook.id does not exist\r\n    }\r\n```\r\nWhen I set the model connection to `memory` instead of `postgresql`, the record is successfully executed\r\n\r\nReferring to ghaiklor/generator-sails-rest-api#44"},"comment":{"url":"https://api.github.com/repos/balderdashy/sails-postgresql/issues/comments/96428336","html_url":"https://github.com/balderdashy/sails-postgresql/issues/155#issuecomment-96428336","issue_url":"https://api.github.com/repos/balderdashy/sails-postgresql/issues/155","id":96428336,"user":{"login":"orthodoc","id":302414,"avatar_url":"https://avatars.githubusercontent.com/u/302414?v=3","gravatar_id":"","url":"https://api.github.com/users/orthodoc","html_url":"https://github.com/orthodoc","followers_url":"https://api.github.com/users/orthodoc/followers","following_url":"https://api.github.com/users/orthodoc/following{/other_user}","gists_url":"https://api.github.com/users/orthodoc/gists{/gist_id}","starred_url":"https://api.github.com/users/orthodoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orthodoc/subscriptions","organizations_url":"https://api.github.com/users/orthodoc/orgs","repos_url":"https://api.github.com/users/orthodoc/repos","events_url":"https://api.github.com/users/orthodoc/events{/privacy}","received_events_url":"https://api.github.com/users/orthodoc/received_events","type":"User","site_admin":false},"created_at":"2015-04-26T19:52:03Z","updated_at":"2015-04-26T19:52:03Z","body":"It doesn't work with the `schema: true` option as well."}}