{"action":"created","issue":{"url":"https://api.github.com/repos/balderdashy/sails-postgresql/issues/43","labels_url":"https://api.github.com/repos/balderdashy/sails-postgresql/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/balderdashy/sails-postgresql/issues/43/comments","events_url":"https://api.github.com/repos/balderdashy/sails-postgresql/issues/43/events","html_url":"https://github.com/balderdashy/sails-postgresql/issues/43","id":26960161,"number":43,"title":"postgis geometry","user":{"login":"jfgodoy","id":731635,"avatar_url":"https://avatars.githubusercontent.com/u/731635?v=3","gravatar_id":"","url":"https://api.github.com/users/jfgodoy","html_url":"https://github.com/jfgodoy","followers_url":"https://api.github.com/users/jfgodoy/followers","following_url":"https://api.github.com/users/jfgodoy/following{/other_user}","gists_url":"https://api.github.com/users/jfgodoy/gists{/gist_id}","starred_url":"https://api.github.com/users/jfgodoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfgodoy/subscriptions","organizations_url":"https://api.github.com/users/jfgodoy/orgs","repos_url":"https://api.github.com/users/jfgodoy/repos","events_url":"https://api.github.com/users/jfgodoy/events{/privacy}","received_events_url":"https://api.github.com/users/jfgodoy/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2014-02-05T13:43:01Z","updated_at":"2015-10-15T05:34:34Z","closed_at":"2015-10-15T05:34:34Z","body":"I need to use a geometry field of postgis. I know that waterline can't have a so specific type.. but what about a work around?\r\n\r\n```\r\nattributes: {\r\n  x: 'float',\r\n  y: 'float',  \r\n  geom: {\r\n    type: 'string',\r\n    geometry: {\r\n      def: 'SRID=4326;Point',\r\n      bind: ['x', 'y'],\r\n      saveBindData: true\r\n    }\r\n  }\r\n}\r\n```\r\nThe idea is, if an attribute has a geometry property, then the adapter will ignore the type and will build the column definition using geometry.def. If saveBindData is true then the adapter will build the column definitions for that fields too, in other case its information will be used to build the geom data, but not will be saved in the database.\r\n\r\nThe bind variable can be also an array of coordinates following the geojson spec according to the type defined in geometry.def, or a string using the WKT spec, or even a json field using geojson spec.\r\n\r\nwhat do you think about this approach?\r\n"},"comment":{"url":"https://api.github.com/repos/balderdashy/sails-postgresql/issues/comments/148286320","html_url":"https://github.com/balderdashy/sails-postgresql/issues/43#issuecomment-148286320","issue_url":"https://api.github.com/repos/balderdashy/sails-postgresql/issues/43","id":148286320,"user":{"login":"sailsbot","id":14700466,"avatar_url":"https://avatars.githubusercontent.com/u/14700466?v=3","gravatar_id":"","url":"https://api.github.com/users/sailsbot","html_url":"https://github.com/sailsbot","followers_url":"https://api.github.com/users/sailsbot/followers","following_url":"https://api.github.com/users/sailsbot/following{/other_user}","gists_url":"https://api.github.com/users/sailsbot/gists{/gist_id}","starred_url":"https://api.github.com/users/sailsbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sailsbot/subscriptions","organizations_url":"https://api.github.com/users/sailsbot/orgs","repos_url":"https://api.github.com/users/sailsbot/repos","events_url":"https://api.github.com/users/sailsbot/events{/privacy}","received_events_url":"https://api.github.com/users/sailsbot/received_events","type":"User","site_admin":false},"created_at":"2015-10-15T05:34:34Z","updated_at":"2015-10-15T05:34:34Z","body":"Thanks for posting, @jfgodoy.  I'm a repo bot-- nice to meet you!\n\nIt has been 30 days since there have been any updates or new comments on this page.  If this issue has been resolved, feel free to disregard the rest of this message.  On the other hand, if you are still waiting on a patch, please:\n\n  + review our [contribution guide](https://github.com/balderdashy/sails/blob/master/CONTRIBUTING.md) to make sure this submission meets our criteria (only _verified bugs_ with documented features, please;  no questions, commentary, or bug reports about undocumented features or unofficial plugins)\n  + create a new issue with the latest information, including updated version details with error messages, failing tests, and a link back to [the original issue]().  This allows GitHub to automatically create a back-reference for future visitors arriving from search engines.\n\nThanks so much for your help!"}}