{"action":"created","issue":{"url":"https://api.github.com/repos/holidayextras/jsonapi-server/issues/77","labels_url":"https://api.github.com/repos/holidayextras/jsonapi-server/issues/77/labels{/name}","comments_url":"https://api.github.com/repos/holidayextras/jsonapi-server/issues/77/comments","events_url":"https://api.github.com/repos/holidayextras/jsonapi-server/issues/77/events","html_url":"https://github.com/holidayextras/jsonapi-server/issues/77","id":124141121,"number":77,"title":"how to use with mongoose?","user":{"login":"futurist","id":159167,"avatar_url":"https://avatars.githubusercontent.com/u/159167?v=3","gravatar_id":"","url":"https://api.github.com/users/futurist","html_url":"https://github.com/futurist","followers_url":"https://api.github.com/users/futurist/followers","following_url":"https://api.github.com/users/futurist/following{/other_user}","gists_url":"https://api.github.com/users/futurist/gists{/gist_id}","starred_url":"https://api.github.com/users/futurist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/futurist/subscriptions","organizations_url":"https://api.github.com/users/futurist/orgs","repos_url":"https://api.github.com/users/futurist/repos","events_url":"https://api.github.com/users/futurist/events{/privacy}","received_events_url":"https://api.github.com/users/futurist/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-12-28T23:32:05Z","updated_at":"2015-12-30T13:31:16Z","closed_at":null,"body":"I'm trying the lib and want to integrate with my existing mongoose Schema, like below:\r\n\r\n````\r\nvar formTypeSchema = mongoose.Schema({\r\n\r\n  name:{type:String},\r\n  title:{type:String, default:''},\r\n  mainKey:{type:String, default:'_id'},\r\n  desc:{type:String, default:''},\r\n\r\n  createAt:{ type: Date, default: function(){ return new Date() } },\r\n  createBy:{type:_ObjectId , ref:'Person' },\r\n\r\n  updateAt:{ type: Date, default: function(){ return new Date() } },\r\n  updateBy:{type:_ObjectId , ref:'Person' },\r\n\r\n  template: Mixed\r\n\r\n})\r\n````\r\n\r\nwith a sample data:\r\n````\r\n{\r\n  name:\"form1\",\r\n  title:\"test for form1\",\r\n  template: { any:\"object\" }\r\n}\r\n````\r\n\r\ntrying but don't know where to start\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/holidayextras/jsonapi-server/issues/comments/167999048","html_url":"https://github.com/holidayextras/jsonapi-server/issues/77#issuecomment-167999048","issue_url":"https://api.github.com/repos/holidayextras/jsonapi-server/issues/77","id":167999048,"user":{"login":"futurist","id":159167,"avatar_url":"https://avatars.githubusercontent.com/u/159167?v=3","gravatar_id":"","url":"https://api.github.com/users/futurist","html_url":"https://github.com/futurist","followers_url":"https://api.github.com/users/futurist/followers","following_url":"https://api.github.com/users/futurist/following{/other_user}","gists_url":"https://api.github.com/users/futurist/gists{/gist_id}","starred_url":"https://api.github.com/users/futurist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/futurist/subscriptions","organizations_url":"https://api.github.com/users/futurist/orgs","repos_url":"https://api.github.com/users/futurist/repos","events_url":"https://api.github.com/users/futurist/events{/privacy}","received_events_url":"https://api.github.com/users/futurist/received_events","type":"User","site_admin":false},"created_at":"2015-12-30T13:31:16Z","updated_at":"2015-12-30T13:31:16Z","body":"Also noticed in the according mongodb document:\r\n````\r\n{ \"_id\" : BinData(4,\"MDA4ZWY2MDAtMGNhZC00ZmI1LTg2MGEtOTU4NDE0ZGVmZGU3\"), \"id\" : \"008ef600-0cad-4fb5-860a-958414defde7\", \"type\" : \"photos\", \"title\" : \"test photo\", \"url\" : \"http://www.baidu.com\", \"height\" : 20, \"width\" : 30 }\r\n````\r\n`_id` and `id` stored the same UUID in hex and string? can it only be one to optimize the doc size a little?\r\n"}}