{"action":"created","issue":{"url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/453","labels_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/453/labels{/name}","comments_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/453/comments","events_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/453/events","html_url":"https://github.com/strongloop/loopback-datasource-juggler/pull/453","id":58090668,"number":453,"title":"Implement 'Guid' type + fix loading of the GeoPoint type","user":{"login":"bajtos","id":1140553,"avatar_url":"https://avatars.githubusercontent.com/u/1140553?v=3","gravatar_id":"","url":"https://api.github.com/users/bajtos","html_url":"https://github.com/bajtos","followers_url":"https://api.github.com/users/bajtos/followers","following_url":"https://api.github.com/users/bajtos/following{/other_user}","gists_url":"https://api.github.com/users/bajtos/gists{/gist_id}","starred_url":"https://api.github.com/users/bajtos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bajtos/subscriptions","organizations_url":"https://api.github.com/users/bajtos/orgs","repos_url":"https://api.github.com/users/bajtos/repos","events_url":"https://api.github.com/users/bajtos/events{/privacy}","received_events_url":"https://api.github.com/users/bajtos/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/labels/%23review","name":"#review","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"raymondfeng","id":540892,"avatar_url":"https://avatars.githubusercontent.com/u/540892?v=3","gravatar_id":"","url":"https://api.github.com/users/raymondfeng","html_url":"https://github.com/raymondfeng","followers_url":"https://api.github.com/users/raymondfeng/followers","following_url":"https://api.github.com/users/raymondfeng/following{/other_user}","gists_url":"https://api.github.com/users/raymondfeng/gists{/gist_id}","starred_url":"https://api.github.com/users/raymondfeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raymondfeng/subscriptions","organizations_url":"https://api.github.com/users/raymondfeng/orgs","repos_url":"https://api.github.com/users/raymondfeng/repos","events_url":"https://api.github.com/users/raymondfeng/events{/privacy}","received_events_url":"https://api.github.com/users/raymondfeng/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2015-02-18T16:27:57Z","updated_at":"2015-02-18T19:27:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/pulls/453","html_url":"https://github.com/strongloop/loopback-datasource-juggler/pull/453","diff_url":"https://github.com/strongloop/loopback-datasource-juggler/pull/453.diff","patch_url":"https://github.com/strongloop/loopback-datasource-juggler/pull/453.patch"},"body":"The new type represents a UUID (GUID) string value.\r\n\r\nThe constructor interprets the value \"new\" as a request to generate\r\na new unique id, which allows developers to define auto-generated guid\r\nproperties in LDL:\r\n\r\n    id: { type: 'guid', id: true, default: 'new' }\r\n\r\nConnect #388\r\n\r\n/to @raymondfeng @ritch @fabien @kraman  please review\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/comments/74930399","html_url":"https://github.com/strongloop/loopback-datasource-juggler/pull/453#issuecomment-74930399","issue_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/453","id":74930399,"user":{"login":"raymondfeng","id":540892,"avatar_url":"https://avatars.githubusercontent.com/u/540892?v=3","gravatar_id":"","url":"https://api.github.com/users/raymondfeng","html_url":"https://github.com/raymondfeng","followers_url":"https://api.github.com/users/raymondfeng/followers","following_url":"https://api.github.com/users/raymondfeng/following{/other_user}","gists_url":"https://api.github.com/users/raymondfeng/gists{/gist_id}","starred_url":"https://api.github.com/users/raymondfeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raymondfeng/subscriptions","organizations_url":"https://api.github.com/users/raymondfeng/orgs","repos_url":"https://api.github.com/users/raymondfeng/repos","events_url":"https://api.github.com/users/raymondfeng/events{/privacy}","received_events_url":"https://api.github.com/users/raymondfeng/received_events","type":"User","site_admin":false},"created_at":"2015-02-18T19:27:39Z","updated_at":"2015-02-18T19:27:39Z","body":"Let me start with a general discussion.\r\n\r\nI have a plan to refactor the model/property/type definition into its own module to facilitate the definition/construction of JS classes/traits/properties/types. See https://github.com/strongloop/loopback-datasource-juggler/issues/450.\r\n\r\nFor id property, it's actually pretty involved.\r\n\r\n1. What is the type of id (String, Number, ObjectId, or sub-type of them)?\r\n2. Where is the id generated (generated by client, generated by db, or set by app, maybe related to default)? \r\n3. How is the id generated (increment, uuid, or lookup serial from DB)?\r\n4. How does the id map to a DB column?\r\n5. Is it single or composite?\r\n6. How does id map to CRUD operations?\r\n\r\nThe LDL needs to have ability to capture the relevant metadata so that Juggler and connectors can collaboratively honor them. "}}