{"_id":"p-odm","_rev":"142-09d30b1d844cd51f2c7914a1be33c372","name":"p-odm","description":"ODM mongodb library for node.js","dist-tags":{"latest":"3.1.18"},"versions":{"0.0.1":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model"],"contributors":[{"name":"Paulo Lopes"}],"version":"0.0.1","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":">=0.9.7"},"main":"./lib","repository":{"type":"git","url":"git://github.com/pmlopes/p-odm.git"},"license":"MIT","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"_id":"p-odm@0.0.1","devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.2","_defaultsLoaded":true,"dist":{"shasum":"4e2ab5f53913481b95102dda0c32d686dd0622c3","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-0.0.1.tgz","integrity":"sha512-rfC817V+ouVjcnd8mTmErNSHDzubFSWBoN4hQXS+QoBcp7Q5tGOd+1gNuUGgfMunr2Y+lrTnELlnkEVDa/pl4g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIER8CCjnT8/K3+G+2Iu4upVuC74g0GYD3bbBWp0nfftTAiEAnxK1MmGUlw7+0nzhh4789dNSfVWISIETz/f4QOpBPq4="}]},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"0.0.2":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model"],"contributors":[{"name":"Paulo Lopes"}],"version":"0.0.2","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":">=0.9.7"},"main":"./lib","repository":{"type":"git","url":"git://github.com/pmlopes/p-odm.git"},"license":"MIT","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"_id":"p-odm@0.0.2","devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.14","_defaultsLoaded":true,"dist":{"shasum":"d2a388247190f43700b220787fb051fc9fad200b","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-0.0.2.tgz","integrity":"sha512-q9MDQm7wNl4u3IR5T5H45DJjGnocwgL1n/uXrFmsRyLe3Br8Pw4bvksCuzZ2UJ6TPCHG6HWsUALABaxaHbtW4Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD/JM7YfspMyQ7H/pLqnoBirbV9Yq5X/vrYFMrQgud49QIhALbXAxy1ydH9HVIBoq1XMz0pO+o7qO2MZQqpU213DTtY"}]},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"0.0.3":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model"],"contributors":[{"name":"Paulo Lopes"}],"version":"0.0.3","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":">=0.9.7"},"devDependencies":{"nodelint":"0.6.1"},"main":"./lib","repository":{"type":"git","url":"git://github.com/pmlopes/p-odm.git"},"license":"MIT","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"_id":"p-odm@0.0.3","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.14","_defaultsLoaded":true,"dist":{"shasum":"d97894480a48e5e2023505e0c74aca19fa2476ea","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-0.0.3.tgz","integrity":"sha512-3FpfPdqUFj/e6hV7q3pxktUDvM/WQx08oaBtHUsTgppnpI8VAp8ew+9twewBgtdyVQjhMdj5HLRilR6WRS4HzQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCed97UkIQSzm7kZkBgeJzOGd3cxnU1ruUJifGOxaa6YgIhAPDtPEOdkHK7wBcm1+WDkvnD4qot5w9tc8L4Z72UG1uq"}]},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"0.0.4":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model"],"contributors":[{"name":"Paulo Lopes"}],"version":"0.0.4","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":">=0.9.7"},"devDependencies":{"nodelint":"0.6.1"},"main":"./lib","repository":{"type":"git","url":"git://github.com/pmlopes/p-odm.git"},"license":"MIT","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"_id":"p-odm@0.0.4","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.14","_defaultsLoaded":true,"dist":{"shasum":"e1b9c358972e3db83a442402f3722c70f4312b62","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-0.0.4.tgz","integrity":"sha512-q/AKWDmgkd7K+URVhBAogv11Rk6h26my8LH1pUzsfhFhf3NSxIa1qJ1Lq1OVjH7DXrzfzQ4rGRntYOGJLGbbTQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAs3m8v76Lr0v+1jshZ72dT4Rg6LfZMI9XI11key1XzBAiBBWbsBK3kRR+juQie+HKK/PwBO92Y5DXK8QXbux0JEWA=="}]},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"0.0.5":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model"],"contributors":[{"name":"Paulo Lopes"}],"version":"0.0.5","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":">=0.9.7"},"devDependencies":{"nodelint":"0.6.1"},"main":"./lib","repository":{"type":"git","url":"git://github.com/pmlopes/p-odm.git"},"license":"MIT","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"_id":"p-odm@0.0.5","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.14","_defaultsLoaded":true,"dist":{"shasum":"a78ed9e92c3a6266ccb11131282bc92290710d03","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-0.0.5.tgz","integrity":"sha512-QxrsHT6SaILeJXWIkyHt8VauebHt/fDOfNontI59PF5LSSMysbx2qZjlTwgS+EOlnQmBX08QXYmK0sQEicjAJg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCwE1WgIEqGWhJZhQRv1F3WAk5GkGcZ8xSMwIH/F2o9KwIgYBrDPT0TR35wmZGVkqD2pOH7tzPoxRxNkcZIOGzfNfk="}]},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"0.0.6":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model"],"contributors":[{"name":"Paulo Lopes"}],"version":"0.0.6","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":">=0.9.7"},"devDependencies":{"nodelint":"0.6.1"},"main":"./lib","repository":{"type":"git","url":"git://github.com/pmlopes/p-odm.git"},"license":"MIT","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"_id":"p-odm@0.0.6","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.15","_defaultsLoaded":true,"dist":{"shasum":"b4f5f44b2797879dd228a79ecbfc1981bb959e08","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-0.0.6.tgz","integrity":"sha512-d/35WABuiHs3/kGlIjpfYFmLSqzSEF1meADGMz52GD2hSJRNbNTD0iHAcf2pubjI1MSeBG07MHrgFhMPArcmKg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIACy8uIhX2rR7p7qoxtEPQa1P051Z99kKKFBuY+pkfE1AiB778RJo4qThuo43D56JqN1rZO04Rf9EURGOpj2o67M+g=="}]},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"0.0.7":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model"],"contributors":[{"name":"Paulo Lopes"}],"version":"0.0.7","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":">=0.9.7"},"devDependencies":{"nodelint":"0.6.1"},"main":"./lib","repository":{"type":"git","url":"git://github.com/pmlopes/p-odm.git"},"license":"MIT","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"_id":"p-odm@0.0.7","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.15","_defaultsLoaded":true,"dist":{"shasum":"faef1b9aa4d5f2361b40de504bbc9f727a564f28","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-0.0.7.tgz","integrity":"sha512-UipCdOl05AXzXw2jO3zLwSKvXlvn5qeeDCGDDGEyyDAYt3kqc7fVi2Bfv5thsBBNJF4hgfdSTz0IcJmPKvz8mw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH58LwQDlmAuL2tXwEsEvQEzHwFrVEUqAzUZrIk4RJANAiA8C2MqIv2VMFeQfWr0jKXRMrDqMwspGKQfRtVgD366GA=="}]},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"0.0.8":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model"],"contributors":[{"name":"Paulo Lopes"}],"version":"0.0.8","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":">=0.9.7"},"devDependencies":{"nodelint":"0.6.1"},"main":"./lib","repository":{"type":"git","url":"git://github.com/pmlopes/p-odm.git"},"license":"MIT","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"_id":"p-odm@0.0.8","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.15","_defaultsLoaded":true,"dist":{"shasum":"c3f7c954c88c2bee259a84512fdedcd9b99f99bc","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-0.0.8.tgz","integrity":"sha512-Wt+gzyL4iC255L/Ud2PMzbDyWdB4RvoB+AKbG/2SH/lsuUjp1zfTKa83xuiprXAbO4xAIS7W/A4gSLxxosonfQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDsbhutcScirXWTPkWpcnQ9kq70WjvUlcXQz7FqyfviNgIgWlfw7RyekIuML0xbTraroQDzic2Fa6FZ5Z5LUM+ot4s="}]},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"0.0.9":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model"],"contributors":[{"name":"Paulo Lopes"}],"version":"0.0.9","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":">=0.9.7"},"devDependencies":{"nodelint":"0.6.1"},"main":"./lib","repository":{"type":"git","url":"git://github.com/pmlopes/p-odm.git"},"license":"MIT","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"_id":"p-odm@0.0.9","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.15","_defaultsLoaded":true,"dist":{"shasum":"6b2a0b78e11805d446c044ca7397fd79f7967660","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-0.0.9.tgz","integrity":"sha512-Sd9C+sQaIzYxDHUHLLr/yEbkHYidaUnF2kjQeT7pychdvhohM9gW7rh5QrHdc6XpH3Z5/Bdgf6uHosr+VDb9IQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDAFP/W/56aPgajoocan5XUrZ/svyBCjZmkEl4559nwhwIgU0YhRGsFcuFdbR6I5bgmf+6bEzmrR2uQ5ryn6+DD7W4="}]},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"0.0.10":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model"],"contributors":[{"name":"Paulo Lopes"}],"version":"0.0.10","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":">=0.9.7"},"devDependencies":{"nodelint":"0.6.1"},"main":"./lib","repository":{"type":"git","url":"git://github.com/pmlopes/p-odm.git"},"license":"MIT","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"_id":"p-odm@0.0.10","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.15","_defaultsLoaded":true,"dist":{"shasum":"97cb434dcdebca793f157035d0a5b18d0ccd96f4","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-0.0.10.tgz"},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"0.0.11":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model"],"contributors":[{"name":"Paulo Lopes"}],"version":"0.0.11","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":">=0.9.7"},"devDependencies":{"nodelint":"0.6.1"},"main":"./lib","repository":{"type":"git","url":"git://github.com/pmlopes/p-odm.git"},"license":"MIT","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"_id":"p-odm@0.0.11","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.15","_defaultsLoaded":true,"dist":{"shasum":"964613e24f18ec48a3b8c6845a87515dd6bb2281","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-0.0.11.tgz","integrity":"sha512-g765u/CgI+AxYlLppC9KmL/ilVkPiDPSOdBDRBUpCrKTBb9pj7VQbQjZBr3Ms3Y2J761kXe8uPuLBbOFrQYZrQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCLHaMHC6bgoa4w/zle5X2DIphVH8XDOt5e68OrfkXqcQIhALQNcygrxe5JIpEYdQmzmUj9FPZpadh9GCjBOOvLTo54"}]},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"0.0.12":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model"],"contributors":[{"name":"Paulo Lopes"}],"version":"0.0.12","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":">=0.9.7"},"devDependencies":{"nodelint":"0.6.1"},"main":"./lib","repository":{"type":"git","url":"git://github.com/pmlopes/p-odm.git"},"license":"MIT","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"_id":"p-odm@0.0.12","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.15","_defaultsLoaded":true,"dist":{"shasum":"6756c63dc1331ba301421c96040cd5d95f909bd4","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-0.0.12.tgz","integrity":"sha512-/cL4zdwkZbZvVgiy4oMVgq/WnQ6pgWWtt0t6kAKjHQbD29/mL3Uyg7uGyKdeS4WXTsTHru+cttUfVNIwGdhAHg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAerm/tuvjwHYEwcBKs+mm9PDZUlBOFI1Z+KDPO61/VbAiEAjP1AWM5++UZzKBb6lIbgAX+TAB1z8XAPIHbHRLnUYuo="}]},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"0.0.13":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model"],"contributors":[{"name":"Paulo Lopes"}],"version":"0.0.13","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":">=0.9.7"},"devDependencies":{"nodelint":"0.6.1"},"main":"./lib","repository":{"type":"git","url":"git://github.com/pmlopes/p-odm.git"},"license":"MIT","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"_id":"p-odm@0.0.13","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.15","_defaultsLoaded":true,"dist":{"shasum":"2f52736adc3321647e09441195450bce915d0e49","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-0.0.13.tgz","integrity":"sha512-2/HhVwPmvaLoJ1uOSnIb9wkom/zyrJ6L3N5bVKbUVjutZENAsoZvupp8eTIsHXeLtXxk1GmnLwMEFJ55Ib+l3g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC2kvApR/pF/zXKOSEqetjT6+3RhyoH8CEFvaZTm/RqnAIgXAHw5hP1XnhVjvItfR9p0B56doybTOpbZR26dHj34/I="}]},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"0.0.14":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model"],"contributors":[{"name":"Paulo Lopes"}],"version":"0.0.14","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":">=0.9.7"},"devDependencies":{"nodelint":"0.6.1"},"main":"./lib","repository":{"type":"git","url":"git://github.com/pmlopes/p-odm.git"},"license":"MIT","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"_id":"p-odm@0.0.14","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.17","_defaultsLoaded":true,"dist":{"shasum":"cc7ca34f76d2f934cb926be867dff97fb7e3cbbd","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-0.0.14.tgz","integrity":"sha512-uxCibsH7KPWy2o5chL/MpN50pPwelTbF5ZgsGjMHYod68QBoxpmf3s1xQPjRYUQkIl8VoAA7kpEzpXZgZO2u4g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCJraMptc5caGa0e1yszUWu1or3oMscY/20mVta4B7CtwIgX3fbxUawT8n81L80A+yCaRG54+/EGkPsEu6f65IFpZc="}]},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"0.0.15":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model"],"contributors":[{"name":"Paulo Lopes"}],"version":"0.0.15","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":">=0.9.7"},"devDependencies":{"nodelint":"0.6.1"},"main":"./lib","repository":{"type":"git","url":"git://github.com/pmlopes/p-odm.git"},"license":"MIT","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"_id":"p-odm@0.0.15","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.17","_defaultsLoaded":true,"dist":{"shasum":"9bc0bbc751f154929afdcae37030a502b52c2fba","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-0.0.15.tgz","integrity":"sha512-EZRFnxOWk5qMFrh5xxw2yvNl/XleD/2//jnps5AVg/XcyfN37lpT6Yzn4f5fSTZp1d/3sufTbYNc96YBRbIg6g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDdg1w5Fsk7O95jcD8Bd0P/XLL0zxQLhVIZMYGv2gFPLAiEAn1QHImWC7ZcrddjsFKBY/oo+I8RBgeZdTU6jLb6kFfs="}]},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"0.0.16":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model"],"contributors":[{"name":"Paulo Lopes"}],"version":"0.0.16","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":">=0.9.7"},"devDependencies":{"nodelint":"0.6.1"},"main":"./lib","repository":{"type":"git","url":"git://github.com/pmlopes/p-odm.git"},"license":"MIT","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"_id":"p-odm@0.0.16","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.14","_defaultsLoaded":true,"dist":{"shasum":"d588c04453c93f4b98e3fd246549055827388d10","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-0.0.16.tgz","integrity":"sha512-y97Px2F1yy1O6ouCf7PugB1L9LZE1l//4bcEFPNaC4F+k186z/+q3mwhlwM/xrKcCUixqYtja+mYlPaayTzmZQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAv2sfKyr/fM7t7CieVmlJfokhgz51C4CV6Hi3M7ZJw4AiAL5SVlgKhxgz4xT7tIJWFnk9rr/FGWkxrvHK1wi2VKVQ=="}]},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"0.0.17":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model"],"contributors":[{"name":"Paulo Lopes"}],"version":"0.0.17","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":">=0.9.7"},"devDependencies":{"nodelint":"0.6.1"},"main":"./lib","repository":{"type":"git","url":"git://github.com/pmlopes/p-odm.git"},"license":"MIT","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"_id":"p-odm@0.0.17","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.14","_defaultsLoaded":true,"dist":{"shasum":"dd5307a2d510575bc8d1f8d3bd625a5166c36a44","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-0.0.17.tgz","integrity":"sha512-a719lWyRRcTCe8OLnBpvsG5GZpuSQsyvTATtxNfPpkwmypSLloZUqKXj07daj3gPvzEPav0HdyTSz12wDXF9tQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD8ZZv6za8E0sTfJW6K5KOR7rEICMIdg/FCGsCWE5LafAIhAKQWfrie3YgbVI7MoPizxIAtgo1lchWXX+O6Rmn+gFxY"}]},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"0.0.18":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model"],"contributors":[{"name":"Paulo Lopes"}],"version":"0.0.18","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":">=0.9.7"},"devDependencies":{"nodelint":"0.6.1"},"main":"./lib","repository":{"type":"git","url":"git://github.com/pmlopes/p-odm.git"},"license":"MIT","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"_id":"p-odm@0.0.18","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.14","_defaultsLoaded":true,"dist":{"shasum":"9403a3eedc8d424fbc57e976a5cb6fc888dd3dc8","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-0.0.18.tgz","integrity":"sha512-bi3Dv5gcKvHIVUr6vWIvBb3zP/I8tN0yn82z7UYnClHO5YMquQyxeHi7yiYYZjd46UUt0HabpTYjef6AtR5itA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDBeIKV5ZiTaI97wKKivylecXjR1pLUlgeBEsieYcgN/AiAZFeasWg6xr6lfhKpc/mDD6CqtLJLYMkqY1Xh6jVLrnw=="}]},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"0.0.19":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model"],"contributors":[{"name":"Paulo Lopes"}],"version":"0.0.19","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":">=0.9.7"},"main":"./lib","repository":{"type":"git","url":"git://github.com/pmlopes/p-odm.git"},"license":"MIT","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"_id":"p-odm@0.0.19","devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.14","_defaultsLoaded":true,"dist":{"shasum":"3e6323e7f2fd1c13b96040dec68111aae209134a","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-0.0.19.tgz","integrity":"sha512-iHAGK8sWeXlebiBlL04FrgnCYRRys3mXzHiGqzwSUIw3NS1jgLb+FOqKIX+LXammuPT1VlbF0wbQGOJLkjRX1Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDDgdd1EqU0sBfXm6FOKBh+OjuN7ZH23ixd6xKW9rFgiAiEAirA3sJmlHFmUxXT0Hw/y2P4LHZa/1y+fPHh/cXbnLMQ="}]},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"0.0.20":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model"],"contributors":[{"name":"Paulo Lopes"}],"version":"0.0.20","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":">=0.9.7"},"main":"./lib","repository":{"type":"git","url":"git://github.com/pmlopes/p-odm.git"},"license":"MIT","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"_id":"p-odm@0.0.20","devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.14","_defaultsLoaded":true,"dist":{"shasum":"5527f54d4e4e25c122be612329e14c950c07d727","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-0.0.20.tgz","integrity":"sha512-mbvKc0DTTRxcHjlcPEblw6aqnJzjyjrsBtinMwl8rbxJ9XE6DtPUg3XT7cK8qaKL24KqoRidBbOSQwMQTykC/g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE8HpKZfPsTuvM58f6JvCBOGQJimYXheGyrw0VkzO49nAiEA3BdEwazmur80s5dqW4wOrMv7g7DE/0L3dsdIufgvRSo="}]},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"0.0.21":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model"],"contributors":[{"name":"Paulo Lopes"}],"version":"0.0.21","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":">=0.9.7"},"main":"./lib","repository":{"type":"git","url":"git://github.com/pmlopes/p-odm.git"},"license":"MIT","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"_id":"p-odm@0.0.21","devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.17","_defaultsLoaded":true,"dist":{"shasum":"826b7fd2934f9f2eaa02f60de8d9aeea7e4a8844","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-0.0.21.tgz","integrity":"sha512-nwOcue75EUnT7mOjlmnq8NfKYisjb4DZYiOmHllKnWXvCD6GbnvHgoKwl05HfxdObYLEUV7lTUJ1TE/FJaBUSw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCuRc7uZ5TosE2E5OfUFbMycQ/gcjXqmZpjHxzsZHg64gIhAMzUxKW4SJv9Oy+fojm7U2OKdTog38uTAub5YM6q20I4"}]},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"0.0.22":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model"],"contributors":[{"name":"Paulo Lopes"}],"version":"0.0.22","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":">=0.9.7"},"main":"./lib","repository":{"type":"git","url":"git://github.com/pmlopes/p-odm.git"},"license":"MIT","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"_id":"p-odm@0.0.22","devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.17","_defaultsLoaded":true,"dist":{"shasum":"102a57a65e9e87e67f25d38367a299d2344a7692","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-0.0.22.tgz","integrity":"sha512-uL/BjptpgqcqcFrMxNje9o58MSBKcArCFhPoAYO3PCPYK6OnBPXS1dOz+H4i/4hhIoJB+VrlqqJRdryvRdv92w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFjSOti6Y3rIovCR7bDwNsyBVy6luGbbAnVwBnNKiVTcAiEAqhIh+1Z/uuPVKQ1dxyKqos1PS2Nhcu7nIDJNemJf0+Q="}]},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"0.0.23":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model"],"contributors":[{"name":"Paulo Lopes"}],"version":"0.0.23","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":">=0.9.7"},"main":"./lib","repository":{"type":"git","url":"git://github.com/pmlopes/p-odm.git"},"license":"MIT","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"_id":"p-odm@0.0.23","devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.17","_defaultsLoaded":true,"dist":{"shasum":"8bd0299acf6d6b00c7de03d7baf5bde904b8e981","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-0.0.23.tgz","integrity":"sha512-A2VOC0h6pIiDT/o+TYn7BAxbTbFcVKH2zdVWy61Dn8WH4o6pmqgNvYE9J5tX3/KA4BBuaex//JApQ0JCTn3npQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHArkfCt03uwfcgGss/T30bJMNATi4YvdS7fzxMlpaMLAiEA9tHo8cieKz0FWjR7XaPznV82XXQbTv9j3k5AvNsw0bQ="}]},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"0.0.24":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model"],"contributors":[{"name":"Paulo Lopes"}],"version":"0.0.24","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":">=0.9.7"},"main":"./lib","repository":{"type":"git","url":"git://github.com/pmlopes/p-odm.git"},"license":"MIT","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"_id":"p-odm@0.0.24","devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.17","_defaultsLoaded":true,"dist":{"shasum":"848c99ed85b09afeafd817df1cb4e6a1b606e865","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-0.0.24.tgz","integrity":"sha512-Q/1CSUUMhk6AQgQMXr9QPvU6NEmmbvZOmQyp0xKu9ZV3Y3kkenie6o3ZCGk97zfQop2JbjF0wccb+cgkwp+NJQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCGM5zTJRxrdsKdR+xzqbj5mf9NK3HRF6zA53ofYSuhJgIhAJi3Kwov1FUER25ufr69KVbIQb8DWPNwbSXnKxStF2Z7"}]},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"0.0.25":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model"],"contributors":[{"name":"Paulo Lopes"}],"version":"0.0.25","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":">=0.9.7"},"main":"./lib","repository":{"type":"git","url":"git://github.com/pmlopes/p-odm.git"},"license":"MIT","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"_id":"p-odm@0.0.25","devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.17","_defaultsLoaded":true,"dist":{"shasum":"18fc411915cf226affe690755d911268467ec01e","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-0.0.25.tgz","integrity":"sha512-raXhXQ0vwxBU5k5t9VfXTJjpOWfpa1DnPRwfl2wOvz8VoBhjIunZW4SxbQI9bemB6g8dfvmyWK3bgf+MOrZHww==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD7Da64MX61MlWBGJ8IwfQGiwHyoK62pmD+nO4oyzBgdgIgQfC5UpebWfp9M65iduRk0kjz/EHyjE8iaqZTWTzaAGk="}]},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"0.0.26":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model"],"contributors":[{"name":"Paulo Lopes"}],"version":"0.0.26","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":">=0.9.7"},"main":"./lib","repository":{"type":"git","url":"git://github.com/pmlopes/p-odm.git"},"license":"MIT","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"_id":"p-odm@0.0.26","devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.17","_defaultsLoaded":true,"dist":{"shasum":"054949aeec0cf41ad0711d8910283758a053d7ce","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-0.0.26.tgz","integrity":"sha512-afPqTzd+WbHYxYNdCH0dkg1J9jQoQ6XOT3EAehIXSpEIHsgLHz9aw9RoDveyldofQZQk76sR+SIMd80f7SaFvQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEm7U/UOG4xsvxWsQBLoyW20OJCPFR53Qahhn2verIQIAiEA5LbVgj09kLNmeezNYnY0fEVyXtINUXjNfVyEJN4Dy9c="}]},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"0.0.27":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model","view"],"contributors":[{"name":"Paulo Lopes"}],"version":"0.0.27","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":">=0.9.7"},"main":"./lib","repository":{"type":"git","url":"git://github.com/pmlopes/p-odm.git"},"license":"MIT","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"_id":"p-odm@0.0.27","devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.17","_defaultsLoaded":true,"dist":{"shasum":"7fd68936fde725485ad272a596491f5ce5d11080","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-0.0.27.tgz","integrity":"sha512-4Vqd28KvkngjUdtiZtIRaCvRI0mrRacV+ePJgl+V9676ZRC6b/JH51z9yOfbetAvdL/+38+S/36uE1fChoLhYw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFtMZ6UNuYpzhMWEQiGvnnvLXqy9pDzX9HBC1twpVFcyAiEA/McT/D/T8AVGXe0NcVy7rVZKePlXs8QBLY2BjOZ8OBE="}]},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"3.0.0":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model","view"],"contributors":[{"name":"Paulo Lopes"}],"version":"3.0.0","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":">=1.0.2","jsonschema":">= 0.0.3"},"main":"./lib","repository":{"type":"git","url":"https://github.com/roughcookie/p-odm.git"},"readme":"# ODM\n\nODM is a new, innovative and easy way to use MongoDB documents, as Models, in your code.\nIt uses the [JSON schema](http://tools.ietf.org/html/draft-zyp-json-schema-03) standard for validating the documents.\n\n## Quick Start\n\n### Connect\n\n\todm.connect('mongodb://127.0.0.1:27017/simple');\n\n### Define a model\n\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t  }\n\t});\n\n### Embedding other documents\n\nWe embed an address model in person:\n\t\n\t// Address, to be embedded on Person\n\tvar Address = odm.model({\n\t  \"id\": \"Simple#Address\",\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"lines\": {\n\t      \"type\": \"array\",\n\t      \"items\": {\"type\": \"string\"}\n\t    },\n\t    \"zip\": {\"type\": \"string\"},\n\t    \"city\": {\"type\": \"string\"},\n\t    \"country\": {\"type\": \"string\"}\n\t  }\n\t});\n\t\nThe changed person model:\n\t\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t    \"address\": {\"$ref\": \"Simple#Address\"}\n\t  }\n\t});\n\n\n## Methods\n\n### Class methods\n\n#### ODM#parse(jsonString)\nParses a JSON string to a JSON document. It is aware of ISO Dates and ObjectIds and coverts them on the fly.\n\n#### Model#findOne(query, fields, options, callback)\nFinds one document or `fields`, satisfying `query`.\n\n\tPerson.findOne({'name': 'Barack Obama'}, function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#findById(id, fields, options, callback)\nFinds one document by `id`, returining `fields`.\n\n\tPerson.findById(\"4ff3fcf14335e9d6ba000001\", function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#find(query, fields, options, callback)\nFinds all documents or `fields`, satisfying `query`.\n\n\tPerson.find({'name': 'Barack Obama'}, function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\t\n#### Model#findAll(fields, options, callback)\nFinds all documents or `fields`.\n\n\tPerson.findAll(function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\n#### Model#remove(query, options, callback)\nRemoves all documents satisfying `query`.\n\n#### Model#update(query, document, options, callback)\nUpdate all documents satisfying `query`, with document.\n\n#### Model#loadDbRef(id/ids, options, callback)\nLoads one Id or array of ids, it is similar to a simple find, however the number of results and order is the same as the array argument\n\n#### Model#ensureIndex(fieldOrSpec, options, callback)\nAdds an index and will also add a `findByXXX` method, where XXX is the name of the `fieldOrSpec`\n\n### Instance methods\n\n#### Model.validate(verbose)\nReturns true or false, or all errors in case `verbose` is true.\n\n#### Model.save(options, callback)\nSaves the instance model.\n\n\tp.save(function (error, id) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  } \n\t  console.log(id);\n\t});\n\n#### Model.update(query, document, options, callback)\nUpdate the instance model.\n\n#### Model.insert(options, callback)\nInsert the instance model.\n\n#### Model.remove(options, callback)\nRemove the instance model.","_id":"p-odm@3.0.0","dist":{"shasum":"8448584c65578f3f73c9f7a98e15145da2d720c3","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-3.0.0.tgz","integrity":"sha512-pgNXTGL1usGHbIbwz2uSpCKmb1oODOUbEzCh7f7+7A5mn5+N9yrw5Cij9x2oAdRqx2UhmmsuHm3g3dwMDMzZQg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCstqRFQ7d5KhVD00sVhX7gKS1ohRVPCwlhPxT53g3HgwIgaR1BJAN+WHOUUb7mKmm4uOg5xn6UjyY4kajllRdSdos="}]},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"3.0.1":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model","view"],"contributors":[{"name":"Paulo Lopes"}],"version":"3.0.1","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":"1.0.2","jsonschema":">= 0.0.3"},"main":"./lib","repository":{"type":"git","url":"https://github.com/roughcookie/p-odm.git"},"readme":"# ODM\n\nODM is a new, innovative and easy way to use MongoDB documents, as Models, in your code.\nIt uses the [JSON schema](http://tools.ietf.org/html/draft-zyp-json-schema-03) standard for validating the documents.\n\n## Quick Start\n\n### Connect\n\n\todm.connect('mongodb://127.0.0.1:27017/simple');\n\n### Define a model\n\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t  }\n\t});\n\n### Embedding other documents\n\nWe embed an address model in person:\n\t\n\t// Address, to be embedded on Person\n\tvar Address = odm.model({\n\t  \"id\": \"Simple#Address\",\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"lines\": {\n\t      \"type\": \"array\",\n\t      \"items\": {\"type\": \"string\"}\n\t    },\n\t    \"zip\": {\"type\": \"string\"},\n\t    \"city\": {\"type\": \"string\"},\n\t    \"country\": {\"type\": \"string\"}\n\t  }\n\t});\n\t\nThe changed person model:\n\t\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t    \"address\": {\"$ref\": \"Simple#Address\"}\n\t  }\n\t});\n\n\n## Methods\n\n### Class methods\n\n#### ODM#parse(jsonString)\nParses a JSON string to a JSON document. It is aware of ISO Dates and ObjectIds and coverts them on the fly.\n\n#### Model#findOne(query, fields, options, callback)\nFinds one document or `fields`, satisfying `query`.\n\n\tPerson.findOne({'name': 'Barack Obama'}, function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#findById(id, fields, options, callback)\nFinds one document by `id`, returining `fields`.\n\n\tPerson.findById(\"4ff3fcf14335e9d6ba000001\", function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#find(query, fields, options, callback)\nFinds all documents or `fields`, satisfying `query`.\n\n\tPerson.find({'name': 'Barack Obama'}, function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\t\n#### Model#findAll(fields, options, callback)\nFinds all documents or `fields`.\n\n\tPerson.findAll(function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\n#### Model#remove(query, options, callback)\nRemoves all documents satisfying `query`.\n\n#### Model#update(query, document, options, callback)\nUpdate all documents satisfying `query`, with document.\n\n#### Model#loadDbRef(id/ids, options, callback)\nLoads one Id or array of ids, it is similar to a simple find, however the number of results and order is the same as the array argument\n\n#### Model#ensureIndex(fieldOrSpec, options, callback)\nAdds an index and will also add a `findByXXX` method, where XXX is the name of the `fieldOrSpec`\n\n### Instance methods\n\n#### Model.validate(verbose)\nReturns true or false, or all errors in case `verbose` is true.\n\n#### Model.save(options, callback)\nSaves the instance model.\n\n\tp.save(function (error, id) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  } \n\t  console.log(id);\n\t});\n\n#### Model.update(query, document, options, callback)\nUpdate the instance model.\n\n#### Model.insert(options, callback)\nInsert the instance model.\n\n#### Model.remove(options, callback)\nRemove the instance model.","_id":"p-odm@3.0.1","dist":{"shasum":"92ac4cbfb7d46d064e20fa312e208f9902cf550c","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-3.0.1.tgz","integrity":"sha512-QQSJyETf9TfWbUuY3ohiv16tuzsQhUKfc5cFomFrawIoUcH36dAnSSxmuMqDLS0mHRlkMwhlxGbLfP54rrronQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDZmiW/m+49uMPmdKSxPsotd+QfS8oQZCRahNMQ+cYS2QIhAJHYfE8Mju7QRwl4uIYinmwJ/zegzQt7YMw1XbAEWoZm"}]},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"3.0.2":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model","view"],"contributors":[{"name":"Paulo Lopes"}],"version":"3.0.2","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":"1.0.2","jsonschema":">= 0.0.3"},"main":"./lib","repository":{"type":"git","url":"https://github.com/roughcookie/p-odm.git"},"readme":"# ODM\n\nODM is a new, innovative and easy way to use MongoDB documents, as Models, in your code.\nIt uses the [JSON schema](http://tools.ietf.org/html/draft-zyp-json-schema-03) standard for validating the documents.\n\n## Quick Start\n\n### Connect\n\n\todm.connect('mongodb://127.0.0.1:27017/simple');\n\n### Define a model\n\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t  }\n\t});\n\n### Embedding other documents\n\nWe embed an address model in person:\n\t\n\t// Address, to be embedded on Person\n\tvar Address = odm.model({\n\t  \"id\": \"Simple#Address\",\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"lines\": {\n\t      \"type\": \"array\",\n\t      \"items\": {\"type\": \"string\"}\n\t    },\n\t    \"zip\": {\"type\": \"string\"},\n\t    \"city\": {\"type\": \"string\"},\n\t    \"country\": {\"type\": \"string\"}\n\t  }\n\t});\n\t\nThe changed person model:\n\t\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t    \"address\": {\"$ref\": \"Simple#Address\"}\n\t  }\n\t});\n\n\n## Methods\n\n### Class methods\n\n#### ODM#parse(jsonString)\nParses a JSON string to a JSON document. It is aware of ISO Dates and ObjectIds and coverts them on the fly.\n\n#### Model#findOne(query, fields, options, callback)\nFinds one document or `fields`, satisfying `query`.\n\n\tPerson.findOne({'name': 'Barack Obama'}, function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#findById(id, fields, options, callback)\nFinds one document by `id`, returining `fields`.\n\n\tPerson.findById(\"4ff3fcf14335e9d6ba000001\", function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#find(query, fields, options, callback)\nFinds all documents or `fields`, satisfying `query`.\n\n\tPerson.find({'name': 'Barack Obama'}, function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\t\n#### Model#findAll(fields, options, callback)\nFinds all documents or `fields`.\n\n\tPerson.findAll(function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\n#### Model#remove(query, options, callback)\nRemoves all documents satisfying `query`.\n\n#### Model#update(query, document, options, callback)\nUpdate all documents satisfying `query`, with document.\n\n#### Model#loadDbRef(id/ids, options, callback)\nLoads one Id or array of ids, it is similar to a simple find, however the number of results and order is the same as the array argument\n\n#### Model#ensureIndex(fieldOrSpec, options, callback)\nAdds an index and will also add a `findByXXX` method, where XXX is the name of the `fieldOrSpec`\n\n### Instance methods\n\n#### Model.validate(verbose)\nReturns true or false, or all errors in case `verbose` is true.\n\n#### Model.save(options, callback)\nSaves the instance model.\n\n\tp.save(function (error, id) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  } \n\t  console.log(id);\n\t});\n\n#### Model.update(query, document, options, callback)\nUpdate the instance model.\n\n#### Model.insert(options, callback)\nInsert the instance model.\n\n#### Model.remove(options, callback)\nRemove the instance model.","_id":"p-odm@3.0.2","dist":{"shasum":"9403fc71bb0ffc1c078c0576962156e96348217c","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-3.0.2.tgz","integrity":"sha512-DEhu5ihM4UWRTCCJn2BMKkVHFugoe9EV7uMZQsYxKTr04Drp7Z1hRzXTOcgdcuQtIQeDJqYDt8LWWo+GdUKYTA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCPF3Qm0hq+vzW09Ko6NJ1qaKXaqMYBL3+ymgU4bjse8AIhAN3jJunxCaDVA9MyTsUFNZGskYOMg7pBdag2ltRtH2GU"}]},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"3.0.3":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model","view"],"contributors":[{"name":"Paulo Lopes"}],"version":"3.0.3","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":"1.1.2","jsonschema":"0.0.4"},"main":"./lib","repository":{"type":"git","url":"https://github.com/roughcookie/p-odm.git"},"readme":"# ODM\n\nODM is a new, innovative and easy way to use MongoDB documents, as Models, in your code.\nIt uses the [JSON schema](http://tools.ietf.org/html/draft-zyp-json-schema-03) standard for validating the documents.\n\n## Quick Start\n\n### Connect\n\n\todm.connect('mongodb://127.0.0.1:27017/simple');\n\n### Define a model\n\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t  }\n\t});\n\n### Embedding other documents\n\nWe embed an address model in person:\n\t\n\t// Address, to be embedded on Person\n\tvar Address = odm.model({\n\t  \"id\": \"Simple#Address\",\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"lines\": {\n\t      \"type\": \"array\",\n\t      \"items\": {\"type\": \"string\"}\n\t    },\n\t    \"zip\": {\"type\": \"string\"},\n\t    \"city\": {\"type\": \"string\"},\n\t    \"country\": {\"type\": \"string\"}\n\t  }\n\t});\n\t\nThe changed person model:\n\t\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t    \"address\": {\"$ref\": \"Simple#Address\"}\n\t  }\n\t});\n\n\n## Methods\n\n### Class methods\n\n#### ODM#parse(jsonString)\nParses a JSON string to a JSON document. It is aware of ISO Dates and ObjectIds and coverts them on the fly.\n\n#### Model#findOne(query, fields, options, callback)\nFinds one document or `fields`, satisfying `query`.\n\n\tPerson.findOne({'name': 'Barack Obama'}, function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#findById(id, fields, options, callback)\nFinds one document by `id`, returining `fields`.\n\n\tPerson.findById(\"4ff3fcf14335e9d6ba000001\", function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#find(query, fields, options, callback)\nFinds all documents or `fields`, satisfying `query`.\n\n\tPerson.find({'name': 'Barack Obama'}, function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\t\n#### Model#findAll(fields, options, callback)\nFinds all documents or `fields`.\n\n\tPerson.findAll(function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\n#### Model#remove(query, options, callback)\nRemoves all documents satisfying `query`.\n\n#### Model#update(query, document, options, callback)\nUpdate all documents satisfying `query`, with document.\n\n#### Model#loadDbRef(id/ids, options, callback)\nLoads one Id or array of ids, it is similar to a simple find, however the number of results and order is the same as the array argument\n\n#### Model#ensureIndex(fieldOrSpec, options, callback)\nAdds an index and will also add a `findByXXX` method, where XXX is the name of the `fieldOrSpec`\n\n### Instance methods\n\n#### Model.validate(verbose)\nReturns true or false, or all errors in case `verbose` is true.\n\n#### Model.save(options, callback)\nSaves the instance model.\n\n\tp.save(function (error, id) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  } \n\t  console.log(id);\n\t});\n\n#### Model.update(query, document, options, callback)\nUpdate the instance model.\n\n#### Model.insert(options, callback)\nInsert the instance model.\n\n#### Model.remove(options, callback)\nRemove the instance model.","_id":"p-odm@3.0.3","dist":{"shasum":"eeb101d3d0e11b4eb105aba775d3178aa5116e6e","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-3.0.3.tgz","integrity":"sha512-IWiUjbjjQCk7RzlAxvFoOlwL2gRAsgnx3ScJROsAoEsZZzHPEVN4gr+eIJ25xknZc67Xoj4z719+dGV9IGb5Bw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDQqXrj08rtEOhpKeTxEjJcUPJcVWpq7aVZbGKz58bMhwIgByM66zG5tcmSuZzBQhTjPpF5QGBJ3YaWR8dI4+ikKY8="}]},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"3.0.4":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model","view"],"contributors":[{"name":"Paulo Lopes"}],"version":"3.0.4","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":"1.1.2","jsonschema":"0.0.5"},"main":"./lib","repository":{"type":"git","url":"https://github.com/roughcookie/p-odm.git"},"readme":"# ODM\n\nODM is a new, innovative and easy way to use MongoDB documents, as Models, in your code.\nIt uses the [JSON schema](http://tools.ietf.org/html/draft-zyp-json-schema-03) standard for validating the documents.\n\n## Quick Start\n\n### Connect\n\n\todm.connect('mongodb://127.0.0.1:27017/simple');\n\n### Define a model\n\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t  }\n\t});\n\n### Embedding other documents\n\nWe embed an address model in person:\n\t\n\t// Address, to be embedded on Person\n\tvar Address = odm.model({\n\t  \"id\": \"Simple#Address\",\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"lines\": {\n\t      \"type\": \"array\",\n\t      \"items\": {\"type\": \"string\"}\n\t    },\n\t    \"zip\": {\"type\": \"string\"},\n\t    \"city\": {\"type\": \"string\"},\n\t    \"country\": {\"type\": \"string\"}\n\t  }\n\t});\n\t\nThe changed person model:\n\t\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t    \"address\": {\"$ref\": \"Simple#Address\"}\n\t  }\n\t});\n\n\n## Methods\n\n### Class methods\n\n#### ODM#parse(jsonString)\nParses a JSON string to a JSON document. It is aware of ISO Dates and ObjectIds and coverts them on the fly.\n\n#### Model#findOne(query, fields, options, callback)\nFinds one document or `fields`, satisfying `query`.\n\n\tPerson.findOne({'name': 'Barack Obama'}, function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#findById(id, fields, options, callback)\nFinds one document by `id`, returining `fields`.\n\n\tPerson.findById(\"4ff3fcf14335e9d6ba000001\", function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#find(query, fields, options, callback)\nFinds all documents or `fields`, satisfying `query`.\n\n\tPerson.find({'name': 'Barack Obama'}, function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\t\n#### Model#findAll(fields, options, callback)\nFinds all documents or `fields`.\n\n\tPerson.findAll(function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\n#### Model#remove(query, options, callback)\nRemoves all documents satisfying `query`.\n\n#### Model#update(query, document, options, callback)\nUpdate all documents satisfying `query`, with document.\n\n#### Model#loadDbRef(id/ids, options, callback)\nLoads one Id or array of ids, it is similar to a simple find, however the number of results and order is the same as the array argument\n\n#### Model#ensureIndex(fieldOrSpec, options, callback)\nAdds an index and will also add a `findByXXX` method, where XXX is the name of the `fieldOrSpec`\n\n### Instance methods\n\n#### Model.validate(verbose)\nReturns true or false, or all errors in case `verbose` is true.\n\n#### Model.save(options, callback)\nSaves the instance model.\n\n\tp.save(function (error, id) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  } \n\t  console.log(id);\n\t});\n\n#### Model.update(query, document, options, callback)\nUpdate the instance model.\n\n#### Model.insert(options, callback)\nInsert the instance model.\n\n#### Model.remove(options, callback)\nRemove the instance model.","_id":"p-odm@3.0.4","dist":{"shasum":"dbade5213187b1a2fe14df37b41b036ed3aec271","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-3.0.4.tgz","integrity":"sha512-Eu/OP8ZAIHptLKaHcRspaAop821U/D46rh/d6fKdHlQXzt78dMahJq41hL9rODcM8grLU6SzmDQ9mZYdfj52zg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFE4IkKHrb6m//cDI5Onw5ZgcZ3V2vAMUhLOZ8GujU5/AiAKq34aCZOcwcZzUJgm6h0tAeryRp5uW5bqx5abB1un7A=="}]},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"3.0.5":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model","view"],"contributors":[{"name":"Paulo Lopes"}],"version":"3.0.5","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":"1.0.2","jsonschema":"0.0.5"},"main":"./lib","repository":{"type":"git","url":"https://github.com/pmlopes/p-odm.git"},"readme":"# ODM\n\nODM is a new, innovative and easy way to use MongoDB documents, as Models, in your code.\nIt uses the [JSON schema](http://tools.ietf.org/html/draft-zyp-json-schema-03) standard for validating the documents.\n\n## Quick Start\n\n### Connect\n\n\todm.connect('mongodb://127.0.0.1:27017/simple');\n\n### Define a model\n\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t  }\n\t});\n\n### Embedding other documents\n\nWe embed an address model in person:\n\t\n\t// Address, to be embedded on Person\n\tvar Address = odm.model({\n\t  \"id\": \"Simple#Address\",\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"lines\": {\n\t      \"type\": \"array\",\n\t      \"items\": {\"type\": \"string\"}\n\t    },\n\t    \"zip\": {\"type\": \"string\"},\n\t    \"city\": {\"type\": \"string\"},\n\t    \"country\": {\"type\": \"string\"}\n\t  }\n\t});\n\t\nThe changed person model:\n\t\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t    \"address\": {\"$ref\": \"Simple#Address\"}\n\t  }\n\t});\n\n\n## Methods\n\n### Class methods\n\n#### ODM#parse(jsonString)\nParses a JSON string to a JSON document. It is aware of ISO Dates and ObjectIds and coverts them on the fly.\n\n#### Model#findOne(query, fields, options, callback)\nFinds one document or `fields`, satisfying `query`.\n\n\tPerson.findOne({'name': 'Barack Obama'}, function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#findById(id, fields, options, callback)\nFinds one document by `id`, returining `fields`.\n\n\tPerson.findById(\"4ff3fcf14335e9d6ba000001\", function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#find(query, fields, options, callback)\nFinds all documents or `fields`, satisfying `query`.\n\n\tPerson.find({'name': 'Barack Obama'}, function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\t\n#### Model#findAll(fields, options, callback)\nFinds all documents or `fields`.\n\n\tPerson.findAll(function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\n#### Model#remove(query, options, callback)\nRemoves all documents satisfying `query`.\n\n#### Model#update(query, document, options, callback)\nUpdate all documents satisfying `query`, with document.\n\n#### Model#loadDbRef(id/ids, options, callback)\nLoads one Id or array of ids, it is similar to a simple find, however the number of results and order is the same as the array argument\n\n#### Model#ensureIndex(fieldOrSpec, options, callback)\nAdds an index and will also add a `findByXXX` method, where XXX is the name of the `fieldOrSpec`\n\n### Instance methods\n\n#### Model.validate(verbose)\nReturns true or false, or all errors in case `verbose` is true.\n\n#### Model.save(options, callback)\nSaves the instance model.\n\n\tp.save(function (error, id) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  } \n\t  console.log(id);\n\t});\n\n#### Model.update(query, document, options, callback)\nUpdate the instance model.\n\n#### Model.insert(options, callback)\nInsert the instance model.\n\n#### Model.remove(options, callback)\nRemove the instance model.","_id":"p-odm@3.0.5","dist":{"shasum":"96d6b94150f0f2769c96271fd86bb030831951c1","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-3.0.5.tgz","integrity":"sha512-/+Oaat+Ny1xyxEW+joNvhw0wwCzq9bqFcCyO3raYhSThqjvpedL4oX16u1nydEHjGlIjlxHFJVJL3IepTtD0dA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCAsfQw1gCQ1byjZ5XqsNI2d+Zx6TycY2o6QpVmls8/BwIhAKQdNE16mlCv+4acJ1cyXe1/WkNNl98HAkV5qtG6UwzJ"}]},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"3.0.6":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model","view"],"contributors":[{"name":"Paulo Lopes"}],"version":"3.0.6","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":"1.0.2","jsonschema":"0.0.5"},"main":"./lib","repository":{"type":"git","url":"https://github.com/pmlopes/p-odm.git"},"readme":"# ODM\n\nODM is a new, innovative and easy way to use MongoDB documents, as Models, in your code.\nIt uses the [JSON schema](http://tools.ietf.org/html/draft-zyp-json-schema-03) standard for validating the documents.\n\n## Quick Start\n\n### Connect\n\n\todm.connect('mongodb://127.0.0.1:27017/simple');\n\n### Define a model\n\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t  }\n\t});\n\n### Embedding other documents\n\nWe embed an address model in person:\n\t\n\t// Address, to be embedded on Person\n\tvar Address = odm.model({\n\t  \"id\": \"Simple#Address\",\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"lines\": {\n\t      \"type\": \"array\",\n\t      \"items\": {\"type\": \"string\"}\n\t    },\n\t    \"zip\": {\"type\": \"string\"},\n\t    \"city\": {\"type\": \"string\"},\n\t    \"country\": {\"type\": \"string\"}\n\t  }\n\t});\n\t\nThe changed person model:\n\t\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t    \"address\": {\"$ref\": \"Simple#Address\"}\n\t  }\n\t});\n\n\n## Methods\n\n### Class methods\n\n#### ODM#parse(jsonString)\nParses a JSON string to a JSON document. It is aware of ISO Dates and ObjectIds and coverts them on the fly.\n\n#### Model#findOne(query, fields, options, callback)\nFinds one document or `fields`, satisfying `query`.\n\n\tPerson.findOne({'name': 'Barack Obama'}, function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#findById(id, fields, options, callback)\nFinds one document by `id`, returining `fields`.\n\n\tPerson.findById(\"4ff3fcf14335e9d6ba000001\", function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#find(query, fields, options, callback)\nFinds all documents or `fields`, satisfying `query`.\n\n\tPerson.find({'name': 'Barack Obama'}, function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\t\n#### Model#findAll(fields, options, callback)\nFinds all documents or `fields`.\n\n\tPerson.findAll(function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\n#### Model#remove(query, options, callback)\nRemoves all documents satisfying `query`.\n\n#### Model#update(query, document, options, callback)\nUpdate all documents satisfying `query`, with document.\n\n#### Model#loadDbRef(id/ids, options, callback)\nLoads one Id or array of ids, it is similar to a simple find, however the number of results and order is the same as the array argument\n\n#### Model#ensureIndex(fieldOrSpec, options, callback)\nAdds an index and will also add a `findByXXX` method, where XXX is the name of the `fieldOrSpec`\n\n### Instance methods\n\n#### Model.validate(verbose)\nReturns true or false, or all errors in case `verbose` is true.\n\n#### Model.save(options, callback)\nSaves the instance model.\n\n\tp.save(function (error, id) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  } \n\t  console.log(id);\n\t});\n\n#### Model.update(query, document, options, callback)\nUpdate the instance model.\n\n#### Model.insert(options, callback)\nInsert the instance model.\n\n#### Model.remove(options, callback)\nRemove the instance model.","_id":"p-odm@3.0.6","dist":{"shasum":"c976855256b0665d4344dd7b0cd62ca4918b2190","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-3.0.6.tgz","integrity":"sha512-9hVrBf5wvmaICagk1J7rrwMZX7YmsauKkZrfkSw8jRkjxX8qpMTfQIITESksCo84tibbY4qQmaqynn8RWLwfFw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICnfkHOLhmGBwWI9uAe+X0hlENm4tXZJ0JoftukJ+9XMAiEA8/eLS1n4MiUzuY6DsP9ulpc7bNHM1Q8LV1Au0voQt+0="}]},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"3.0.7":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model","view"],"contributors":[{"name":"Paulo Lopes"}],"version":"3.0.7","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":"1.0.2","jsonschema":"0.0.5"},"main":"./lib","repository":{"type":"git","url":"https://github.com/pmlopes/p-odm.git"},"readme":"# ODM\n\nODM is a new, innovative and easy way to use MongoDB documents, as Models, in your code.\nIt uses the [JSON schema](http://tools.ietf.org/html/draft-zyp-json-schema-03) standard for validating the documents.\n\n## Quick Start\n\n### Connect\n\n\todm.connect('mongodb://127.0.0.1:27017/simple');\n\n### Define a model\n\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t  }\n\t});\n\n### Embedding other documents\n\nWe embed an address model in person:\n\t\n\t// Address, to be embedded on Person\n\tvar Address = odm.model({\n\t  \"id\": \"Simple#Address\",\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"lines\": {\n\t      \"type\": \"array\",\n\t      \"items\": {\"type\": \"string\"}\n\t    },\n\t    \"zip\": {\"type\": \"string\"},\n\t    \"city\": {\"type\": \"string\"},\n\t    \"country\": {\"type\": \"string\"}\n\t  }\n\t});\n\t\nThe changed person model:\n\t\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t    \"address\": {\"$ref\": \"Simple#Address\"}\n\t  }\n\t});\n\n\n## Methods\n\n### Class methods\n\n#### ODM#parse(jsonString)\nParses a JSON string to a JSON document. It is aware of ISO Dates and ObjectIds and coverts them on the fly.\n\n#### Model#findOne(query, fields, options, callback)\nFinds one document or `fields`, satisfying `query`.\n\n\tPerson.findOne({'name': 'Barack Obama'}, function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#findById(id, fields, options, callback)\nFinds one document by `id`, returining `fields`.\n\n\tPerson.findById(\"4ff3fcf14335e9d6ba000001\", function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#find(query, fields, options, callback)\nFinds all documents or `fields`, satisfying `query`.\n\n\tPerson.find({'name': 'Barack Obama'}, function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\t\n#### Model#findAll(fields, options, callback)\nFinds all documents or `fields`.\n\n\tPerson.findAll(function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\n#### Model#remove(query, options, callback)\nRemoves all documents satisfying `query`.\n\n#### Model#update(query, document, options, callback)\nUpdate all documents satisfying `query`, with document.\n\n#### Model#loadDbRef(id/ids, options, callback)\nLoads one Id or array of ids, it is similar to a simple find, however the number of results and order is the same as the array argument\n\n#### Model#ensureIndex(fieldOrSpec, options, callback)\nAdds an index and will also add a `findByXXX` method, where XXX is the name of the `fieldOrSpec`\n\n### Instance methods\n\n#### Model.validate(verbose)\nReturns true or false, or all errors in case `verbose` is true.\n\n#### Model.save(options, callback)\nSaves the instance model.\n\n\tp.save(function (error, id) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  } \n\t  console.log(id);\n\t});\n\n#### Model.update(query, document, options, callback)\nUpdate the instance model.\n\n#### Model.insert(options, callback)\nInsert the instance model.\n\n#### Model.remove(options, callback)\nRemove the instance model.","_id":"p-odm@3.0.7","dist":{"shasum":"88611fd2214c708917160d733ccf00ef34e65480","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-3.0.7.tgz","integrity":"sha512-T0gjiTruW1VmkgZV38ZBwHMvjZCHpyOAKIy8zsVf098oTpWgcHmbvnqQ4C8gBuoKJps9j39r421gFmmpelg1+A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBsD7IxMUlg8WP9AVaCQz3jnKOdClZJFP+8wJveaWHqnAiEA0O+ibMpPvd721BzfvUiMbroXMMWy3aBL+8NEjfEfyos="}]},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"3.0.8":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model","view"],"contributors":[{"name":"Paulo Lopes"}],"version":"3.0.8","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":"1.0.2","jsonschema":"0.0.5"},"main":"./lib","repository":{"type":"git","url":"https://github.com/pmlopes/p-odm.git"},"readme":"# ODM\n\nODM is a new, innovative and easy way to use MongoDB documents, as Models, in your code.\nIt uses the [JSON schema](http://tools.ietf.org/html/draft-zyp-json-schema-03) standard for validating the documents.\n\n## Quick Start\n\n### Connect\n\n\todm.connect('mongodb://127.0.0.1:27017/simple');\n\n### Define a model\n\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t  }\n\t});\n\n### Embedding other documents\n\nWe embed an address model in person:\n\t\n\t// Address, to be embedded on Person\n\tvar Address = odm.model({\n\t  \"id\": \"Simple#Address\",\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"lines\": {\n\t      \"type\": \"array\",\n\t      \"items\": {\"type\": \"string\"}\n\t    },\n\t    \"zip\": {\"type\": \"string\"},\n\t    \"city\": {\"type\": \"string\"},\n\t    \"country\": {\"type\": \"string\"}\n\t  }\n\t});\n\t\nThe changed person model:\n\t\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t    \"address\": {\"$ref\": \"Simple#Address\"}\n\t  }\n\t});\n\n\n## Methods\n\n### Class methods\n\n#### ODM#parse(jsonString)\nParses a JSON string to a JSON document. It is aware of ISO Dates and ObjectIds and coverts them on the fly.\n\n#### Model#findOne(query, fields, options, callback)\nFinds one document or `fields`, satisfying `query`.\n\n\tPerson.findOne({'name': 'Barack Obama'}, function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#findById(id, fields, options, callback)\nFinds one document by `id`, returining `fields`.\n\n\tPerson.findById(\"4ff3fcf14335e9d6ba000001\", function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#find(query, fields, options, callback)\nFinds all documents or `fields`, satisfying `query`.\n\n\tPerson.find({'name': 'Barack Obama'}, function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\t\n#### Model#findAll(fields, options, callback)\nFinds all documents or `fields`.\n\n\tPerson.findAll(function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\n#### Model#remove(query, options, callback)\nRemoves all documents satisfying `query`.\n\n#### Model#update(query, document, options, callback)\nUpdate all documents satisfying `query`, with document.\n\n#### Model#loadDbRef(id/ids, options, callback)\nLoads one Id or array of ids, it is similar to a simple find, however the number of results and order is the same as the array argument\n\n#### Model#ensureIndex(fieldOrSpec, options, callback)\nAdds an index and will also add a `findByXXX` method, where XXX is the name of the `fieldOrSpec`\n\n### Instance methods\n\n#### Model.validate(verbose)\nReturns true or false, or all errors in case `verbose` is true.\n\n#### Model.save(options, callback)\nSaves the instance model.\n\n\tp.save(function (error, id) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  } \n\t  console.log(id);\n\t});\n\n#### Model.update(query, document, options, callback)\nUpdate the instance model.\n\n#### Model.insert(options, callback)\nInsert the instance model.\n\n#### Model.remove(options, callback)\nRemove the instance model.","_id":"p-odm@3.0.8","dist":{"shasum":"394ac624a3b130fb28496fadf19ce95d250085c9","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-3.0.8.tgz","integrity":"sha512-cQHxwi6U3qGCG1YNQhh4TpFWls71b2VFz4zYW8x9lG0unypX4ChaJz0fOlqZxBEy0I6GWxLBHRnAsUoJ0m+xLQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBKRV6kBgvKuZXb3+kuaFPZT7WmPzTT1BKRR4lYZFG3GAiAyWUN722D5ejGMqhWbOWMp5NdxH/3Wq9Mg/0hiN11ndA=="}]},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"3.0.9":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model","view"],"contributors":[{"name":"Paulo Lopes"}],"version":"3.0.9","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":"1.0.2","jsonschema":"0.0.5"},"main":"./lib","repository":{"type":"git","url":"https://github.com/pmlopes/p-odm.git"},"readme":"# ODM\n\nODM is a new, innovative and easy way to use MongoDB documents, as Models, in your code.\nIt uses the [JSON schema](http://tools.ietf.org/html/draft-zyp-json-schema-03) standard for validating the documents.\n\n## Quick Start\n\n### Connect\n\n\todm.connect('mongodb://127.0.0.1:27017/simple');\n\n### Define a model\n\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t  }\n\t});\n\n### Embedding other documents\n\nWe embed an address model in person:\n\t\n\t// Address, to be embedded on Person\n\tvar Address = odm.model({\n\t  \"id\": \"Simple#Address\",\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"lines\": {\n\t      \"type\": \"array\",\n\t      \"items\": {\"type\": \"string\"}\n\t    },\n\t    \"zip\": {\"type\": \"string\"},\n\t    \"city\": {\"type\": \"string\"},\n\t    \"country\": {\"type\": \"string\"}\n\t  }\n\t});\n\t\nThe changed person model:\n\t\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t    \"address\": {\"$ref\": \"Simple#Address\"}\n\t  }\n\t});\n\n\n## Methods\n\n### Class methods\n\n#### ODM#parse(jsonString)\nParses a JSON string to a JSON document. It is aware of ISO Dates and ObjectIds and coverts them on the fly.\n\n#### Model#findOne(query, fields, options, callback)\nFinds one document or `fields`, satisfying `query`.\n\n\tPerson.findOne({'name': 'Barack Obama'}, function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#findById(id, fields, options, callback)\nFinds one document by `id`, returining `fields`.\n\n\tPerson.findById(\"4ff3fcf14335e9d6ba000001\", function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#find(query, fields, options, callback)\nFinds all documents or `fields`, satisfying `query`.\n\n\tPerson.find({'name': 'Barack Obama'}, function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\t\n#### Model#findAll(fields, options, callback)\nFinds all documents or `fields`.\n\n\tPerson.findAll(function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\n#### Model#remove(query, options, callback)\nRemoves all documents satisfying `query`.\n\n#### Model#update(query, document, options, callback)\nUpdate all documents satisfying `query`, with document.\n\n#### Model#loadDbRef(id/ids, options, callback)\nLoads one Id or array of ids, it is similar to a simple find, however the number of results and order is the same as the array argument\n\n#### Model#ensureIndex(fieldOrSpec, options, callback)\nAdds an index and will also add a `findByXXX` method, where XXX is the name of the `fieldOrSpec`\n\n### Instance methods\n\n#### Model.validate(verbose)\nReturns true or false, or all errors in case `verbose` is true.\n\n#### Model.save(options, callback)\nSaves the instance model.\n\n\tp.save(function (error, id) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  } \n\t  console.log(id);\n\t});\n\n#### Model.update(query, document, options, callback)\nUpdate the instance model.\n\n#### Model.insert(options, callback)\nInsert the instance model.\n\n#### Model.remove(options, callback)\nRemove the instance model.","_id":"p-odm@3.0.9","dist":{"shasum":"a7803cedaacf7b1bec0b805100711e06d02d3553","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-3.0.9.tgz","integrity":"sha512-MGpv+/faa42ZfOB0FUy/vaQGBf7ZJXiWLNdOHRvj9M6t7GwBa05XM33TbbTCDZWQ3ENoqymogHhJadMf/vagHw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEF42Eft3J8blMY5LSM9KQB2BJ8kORHhch7ik2P4hXp9AiAeUce03XLvQEUvHFaSZV2aE+5wviX9MuraVah8YdeIig=="}]},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"3.0.10":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model","view"],"contributors":[{"name":"Paulo Lopes"}],"version":"3.0.10","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":"1.0.2","jsonschema":"0.0.6"},"main":"./lib","repository":{"type":"git","url":"https://github.com/pmlopes/p-odm.git"},"readme":"# ODM\n\nODM is a new, innovative and easy way to use MongoDB documents, as Models, in your code.\nIt uses the [JSON schema](http://tools.ietf.org/html/draft-zyp-json-schema-03) standard for validating the documents.\n\n## Quick Start\n\n### Connect\n\n\todm.connect('mongodb://127.0.0.1:27017/simple');\n\n### Define a model\n\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t  }\n\t});\n\n### Embedding other documents\n\nWe embed an address model in person:\n\t\n\t// Address, to be embedded on Person\n\tvar Address = odm.model({\n\t  \"id\": \"Simple#Address\",\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"lines\": {\n\t      \"type\": \"array\",\n\t      \"items\": {\"type\": \"string\"}\n\t    },\n\t    \"zip\": {\"type\": \"string\"},\n\t    \"city\": {\"type\": \"string\"},\n\t    \"country\": {\"type\": \"string\"}\n\t  }\n\t});\n\t\nThe changed person model:\n\t\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t    \"address\": {\"$ref\": \"Simple#Address\"}\n\t  }\n\t});\n\n\n## Methods\n\n### Class methods\n\n#### ODM#parse(jsonString)\nParses a JSON string to a JSON document. It is aware of ISO Dates and ObjectIds and coverts them on the fly.\n\n#### Model#findOne(query, fields, options, callback)\nFinds one document or `fields`, satisfying `query`.\n\n\tPerson.findOne({'name': 'Barack Obama'}, function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#findById(id, fields, options, callback)\nFinds one document by `id`, returining `fields`.\n\n\tPerson.findById(\"4ff3fcf14335e9d6ba000001\", function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#find(query, fields, options, callback)\nFinds all documents or `fields`, satisfying `query`.\n\n\tPerson.find({'name': 'Barack Obama'}, function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\t\n#### Model#findAll(fields, options, callback)\nFinds all documents or `fields`.\n\n\tPerson.findAll(function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\n#### Model#remove(query, options, callback)\nRemoves all documents satisfying `query`.\n\n#### Model#update(query, document, options, callback)\nUpdate all documents satisfying `query`, with document.\n\n#### Model#loadDbRef(id/ids, options, callback)\nLoads one Id or array of ids, it is similar to a simple find, however the number of results and order is the same as the array argument\n\n#### Model#ensureIndex(fieldOrSpec, options, callback)\nAdds an index and will also add a `findByXXX` method, where XXX is the name of the `fieldOrSpec`\n\n### Instance methods\n\n#### Model.validate(verbose)\nReturns true or false, or all errors in case `verbose` is true.\n\n#### Model.save(options, callback)\nSaves the instance model.\n\n\tp.save(function (error, id) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  } \n\t  console.log(id);\n\t});\n\n#### Model.update(query, document, options, callback)\nUpdate the instance model.\n\n#### Model.insert(options, callback)\nInsert the instance model.\n\n#### Model.remove(options, callback)\nRemove the instance model.","_id":"p-odm@3.0.10","dist":{"shasum":"b33dd66b24efcc90fdf82c302411aaea4efcdde1","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-3.0.10.tgz","integrity":"sha512-5DAxDEU7AKaaHhYDKy54PRIiQwQovzKZdnSANUnBgfgwtL7bRTKxbHAMediD3G1xnweWMoqje8O7SCGIwXD3Wg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEWAZ5sHfPzeGWorhEiDDdJU3OWJFKDUfvEICZkJ+dcMAiBfEPxuBGB3WTAEcBgkx2meIa4eXsNlkdoMnx05PBjjYQ=="}]},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"3.1.0":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model","view"],"contributors":[{"name":"Paulo Lopes"}],"version":"3.1.0","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":"1.0.2","jsonschema":"0.1.0"},"main":"./lib","repository":{"type":"git","url":"https://github.com/pmlopes/p-odm.git"},"readme":"# ODM\n\nODM is a new, innovative and easy way to use MongoDB documents, as Models, in your code.\nIt uses the [JSON schema](http://tools.ietf.org/html/draft-zyp-json-schema-03) standard for validating the documents.\n\n## Quick Start\n\n### Connect\n\n\todm.connect('mongodb://127.0.0.1:27017/simple');\n\n### Define a model\n\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t  }\n\t});\n\n### Embedding other documents\n\nWe embed an address model in person:\n\t\n\t// Address, to be embedded on Person\n\tvar Address = odm.model({\n\t  \"id\": \"Simple#Address\",\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"lines\": {\n\t      \"type\": \"array\",\n\t      \"items\": {\"type\": \"string\"}\n\t    },\n\t    \"zip\": {\"type\": \"string\"},\n\t    \"city\": {\"type\": \"string\"},\n\t    \"country\": {\"type\": \"string\"}\n\t  }\n\t});\n\t\nThe changed person model:\n\t\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t    \"address\": {\"$ref\": \"Simple#Address\"}\n\t  }\n\t});\n\n\n## Methods\n\n### Class methods\n\n#### ODM#parse(jsonString)\nParses a JSON string to a JSON document. It is aware of ISO Dates and ObjectIds and coverts them on the fly.\n\n#### Model#findOne(query, fields, options, callback)\nFinds one document or `fields`, satisfying `query`.\n\n\tPerson.findOne({'name': 'Barack Obama'}, function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#findById(id, fields, options, callback)\nFinds one document by `id`, returining `fields`.\n\n\tPerson.findById(\"4ff3fcf14335e9d6ba000001\", function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#find(query, fields, options, callback)\nFinds all documents or `fields`, satisfying `query`.\n\n\tPerson.find({'name': 'Barack Obama'}, function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\t\n#### Model#findAll(fields, options, callback)\nFinds all documents or `fields`.\n\n\tPerson.findAll(function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\n#### Model#remove(query, options, callback)\nRemoves all documents satisfying `query`.\n\n#### Model#update(query, document, options, callback)\nUpdate all documents satisfying `query`, with document.\n\n#### Model#loadDbRef(id/ids, options, callback)\nLoads one Id or array of ids, it is similar to a simple find, however the number of results and order is the same as the array argument\n\n#### Model#ensureIndex(fieldOrSpec, options, callback)\nAdds an index and will also add a `findByXXX` method, where XXX is the name of the `fieldOrSpec`\n\n### Instance methods\n\n#### Model.validate(verbose)\nReturns true or false, or all errors in case `verbose` is true.\n\n#### Model.save(options, callback)\nSaves the instance model.\n\n\tp.save(function (error, id) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  } \n\t  console.log(id);\n\t});\n\n#### Model.update(query, document, options, callback)\nUpdate the instance model.\n\n#### Model.insert(options, callback)\nInsert the instance model.\n\n#### Model.remove(options, callback)\nRemove the instance model.","_id":"p-odm@3.1.0","dist":{"shasum":"4fb91d3664db88a0837f474e3146acddd63400e2","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-3.1.0.tgz","integrity":"sha512-QMJGD1HvRkPDAHGK9qGo8YvyxdiazS5PJB9tLue2Nh9MsxvTt4+slv/ujvFZZfuNRQRv7PTyaFvLT0SJkJgbnA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICKllctHLPENqwHqc0dcJo4sVtRhrk/rdMVffnoGOQynAiA46iHhTsXgpZ5uQj8cyEqfjOcp1MFHLrsPL6WaBTSM4A=="}]},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"3.1.1":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model","view"],"contributors":[{"name":"Paulo Lopes"}],"version":"3.1.1","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":"1.1.5","jsonschema":"0.1.1"},"main":"./lib","repository":{"type":"git","url":"https://github.com/pmlopes/p-odm.git"},"readme":"# ODM\n\nODM is a new, innovative and easy way to use MongoDB documents, as Models, in your code.\nIt uses the [JSON schema](http://tools.ietf.org/html/draft-zyp-json-schema-03) standard for validating the documents.\n\n## Quick Start\n\n### Connect\n\n\todm.connect('mongodb://127.0.0.1:27017/simple');\n\n### Define a model\n\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t  }\n\t});\n\n### Embedding other documents\n\nWe embed an address model in person:\n\t\n\t// Address, to be embedded on Person\n\tvar Address = odm.model({\n\t  \"id\": \"Simple#Address\",\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"lines\": {\n\t      \"type\": \"array\",\n\t      \"items\": {\"type\": \"string\"}\n\t    },\n\t    \"zip\": {\"type\": \"string\"},\n\t    \"city\": {\"type\": \"string\"},\n\t    \"country\": {\"type\": \"string\"}\n\t  }\n\t});\n\t\nThe changed person model:\n\t\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t    \"address\": {\"$ref\": \"Simple#Address\"}\n\t  }\n\t});\n\n\n## Methods\n\n### Class methods\n\n#### ODM#parse(jsonString)\nParses a JSON string to a JSON document. It is aware of ISO Dates and ObjectIds and coverts them on the fly.\n\n#### Model#findOne(query, fields, options, callback)\nFinds one document or `fields`, satisfying `query`.\n\n\tPerson.findOne({'name': 'Barack Obama'}, function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#findById(id, fields, options, callback)\nFinds one document by `id`, returining `fields`.\n\n\tPerson.findById(\"4ff3fcf14335e9d6ba000001\", function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#find(query, fields, options, callback)\nFinds all documents or `fields`, satisfying `query`.\n\n\tPerson.find({'name': 'Barack Obama'}, function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\t\n#### Model#findAll(fields, options, callback)\nFinds all documents or `fields`.\n\n\tPerson.findAll(function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\n#### Model#remove(query, options, callback)\nRemoves all documents satisfying `query`.\n\n#### Model#update(query, document, options, callback)\nUpdate all documents satisfying `query`, with document.\n\n#### Model#loadDbRef(id/ids, options, callback)\nLoads one Id or array of ids, it is similar to a simple find, however the number of results and order is the same as the array argument\n\n#### Model#ensureIndex(fieldOrSpec, options, callback)\nAdds an index and will also add a `findByXXX` method, where XXX is the name of the `fieldOrSpec`\n\n### Instance methods\n\n#### Model.validate(verbose)\nReturns true or false, or all errors in case `verbose` is true.\n\n#### Model.save(options, callback)\nSaves the instance model.\n\n\tp.save(function (error, id) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  } \n\t  console.log(id);\n\t});\n\n#### Model.update(query, document, options, callback)\nUpdate the instance model.\n\n#### Model.insert(options, callback)\nInsert the instance model.\n\n#### Model.remove(options, callback)\nRemove the instance model.","_id":"p-odm@3.1.1","dist":{"shasum":"59b13fa912ebdc5f8b0ae5a6f54b7a606cce44f5","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-3.1.1.tgz","integrity":"sha512-97wdlClBulMVRuSHZ7G/ed9xfgQwJ+sWEW72g43F7xab9jQ5JroaCFTtv3XBPqQ8AW8ANYzVpVkDYNaw5KioDw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHldIXx7UikvsTaLNlIHLV9qv/+ZdgQoPxP9miTMP2yrAiBnrXtrYYdluycZwIRQvzByWB8SXvUNniCY+Rs9eoxL3A=="}]},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"3.1.2":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model","view"],"contributors":[{"name":"Paulo Lopes"}],"version":"3.1.2","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":"1.1.7","jsonschema":"0.1.2"},"main":"./lib","repository":{"type":"git","url":"https://github.com/pmlopes/p-odm.git"},"readme":"# ODM\n\nODM is a new, innovative and easy way to use MongoDB documents, as Models, in your code.\nIt uses the [JSON schema](http://tools.ietf.org/html/draft-zyp-json-schema-03) standard for validating the documents.\n\n## Quick Start\n\n### Connect\n\n\todm.connect('mongodb://127.0.0.1:27017/simple');\n\n### Define a model\n\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t  }\n\t});\n\n### Embedding other documents\n\nWe embed an address model in person:\n\t\n\t// Address, to be embedded on Person\n\tvar Address = odm.model({\n\t  \"id\": \"Simple#Address\",\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"lines\": {\n\t      \"type\": \"array\",\n\t      \"items\": {\"type\": \"string\"}\n\t    },\n\t    \"zip\": {\"type\": \"string\"},\n\t    \"city\": {\"type\": \"string\"},\n\t    \"country\": {\"type\": \"string\"}\n\t  }\n\t});\n\t\nThe changed person model:\n\t\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t    \"address\": {\"$ref\": \"Simple#Address\"}\n\t  }\n\t});\n\n\n## Methods\n\n### Class methods\n\n#### ODM#parse(jsonString)\nParses a JSON string to a JSON document. It is aware of ISO Dates and ObjectIds and coverts them on the fly.\n\n#### Model#findOne(query, fields, options, callback)\nFinds one document or `fields`, satisfying `query`.\n\n\tPerson.findOne({'name': 'Barack Obama'}, function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#findById(id, fields, options, callback)\nFinds one document by `id`, returining `fields`.\n\n\tPerson.findById(\"4ff3fcf14335e9d6ba000001\", function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#find(query, fields, options, callback)\nFinds all documents or `fields`, satisfying `query`.\n\n\tPerson.find({'name': 'Barack Obama'}, function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\t\n#### Model#findAll(fields, options, callback)\nFinds all documents or `fields`.\n\n\tPerson.findAll(function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\n#### Model#remove(query, options, callback)\nRemoves all documents satisfying `query`.\n\n#### Model#update(query, document, options, callback)\nUpdate all documents satisfying `query`, with document.\n\n#### Model#loadDbRef(id/ids, options, callback)\nLoads one Id or array of ids, it is similar to a simple find, however the number of results and order is the same as the array argument\n\n#### Model#ensureIndex(fieldOrSpec, options, callback)\nAdds an index and will also add a `findByXXX` method, where XXX is the name of the `fieldOrSpec`\n\n### Instance methods\n\n#### Model.validate(verbose)\nReturns true or false, or all errors in case `verbose` is true.\n\n#### Model.save(options, callback)\nSaves the instance model.\n\n\tp.save(function (error, id) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  } \n\t  console.log(id);\n\t});\n\n#### Model.update(query, document, options, callback)\nUpdate the instance model.\n\n#### Model.insert(options, callback)\nInsert the instance model.\n\n#### Model.remove(options, callback)\nRemove the instance model.","_id":"p-odm@3.1.2","dist":{"shasum":"b0e45323f376862ef088391625cd6dc5fcf34f3f","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-3.1.2.tgz","integrity":"sha512-BwlUeInx6VBM7RL1fk44dd7NHpidLMFOh64GGRy4M+pdnYDUtBvbD/F6KpZCA3R6bcmpKz35g9FE1FrUUeAeKQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC0XiO/97iEicYIadrAUAMnnzI7RIvf7MDy6WKClVGKVwIhALXIXcldPHFOiPo3nk4EZQNC3k18uy4yfKz3fdHhUE5q"}]},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"3.1.3":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model","view"],"contributors":[{"name":"Paulo Lopes"}],"version":"3.1.3","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":"1.1.11","jsonschema":"0.1.3"},"main":"./lib","repository":{"type":"git","url":"https://github.com/pmlopes/p-odm.git"},"readme":"# ODM\n\nODM is a new, innovative and easy way to use MongoDB documents, as Models, in your code.\nIt uses the [JSON schema](http://tools.ietf.org/html/draft-zyp-json-schema-03) standard for validating the documents.\n\n## Quick Start\n\n### Connect\n\n\todm.connect('mongodb://127.0.0.1:27017/simple');\n\n### Define a model\n\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t  }\n\t});\n\n### Embedding other documents\n\nWe embed an address model in person:\n\t\n\t// Address, to be embedded on Person\n\tvar Address = odm.model({\n\t  \"id\": \"Simple#Address\",\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"lines\": {\n\t      \"type\": \"array\",\n\t      \"items\": {\"type\": \"string\"}\n\t    },\n\t    \"zip\": {\"type\": \"string\"},\n\t    \"city\": {\"type\": \"string\"},\n\t    \"country\": {\"type\": \"string\"}\n\t  }\n\t});\n\t\nThe changed person model:\n\t\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t    \"address\": {\"$ref\": \"Simple#Address\"}\n\t  }\n\t});\n\n\n## Methods\n\n### Class methods\n\n#### ODM#parse(jsonString)\nParses a JSON string to a JSON document. It is aware of ISO Dates and ObjectIds and coverts them on the fly.\n\n#### Model#findOne(query, fields, options, callback)\nFinds one document or `fields`, satisfying `query`.\n\n\tPerson.findOne({'name': 'Barack Obama'}, function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#findById(id, fields, options, callback)\nFinds one document by `id`, returining `fields`.\n\n\tPerson.findById(\"4ff3fcf14335e9d6ba000001\", function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#find(query, fields, options, callback)\nFinds all documents or `fields`, satisfying `query`.\n\n\tPerson.find({'name': 'Barack Obama'}, function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\t\n#### Model#findAll(fields, options, callback)\nFinds all documents or `fields`.\n\n\tPerson.findAll(function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\n#### Model#remove(query, options, callback)\nRemoves all documents satisfying `query`.\n\n#### Model#update(query, document, options, callback)\nUpdate all documents satisfying `query`, with document.\n\n#### Model#loadDbRef(id/ids, options, callback)\nLoads one Id or array of ids, it is similar to a simple find, however the number of results and order is the same as the array argument\n\n#### Model#ensureIndex(fieldOrSpec, options, callback)\nAdds an index and will also add a `findByXXX` method, where XXX is the name of the `fieldOrSpec`\n\n### Instance methods\n\n#### Model.validate(verbose)\nReturns true or false, or all errors in case `verbose` is true.\n\n#### Model.save(options, callback)\nSaves the instance model.\n\n\tp.save(function (error, id) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  } \n\t  console.log(id);\n\t});\n\n#### Model.update(query, document, options, callback)\nUpdate the instance model.\n\n#### Model.insert(options, callback)\nInsert the instance model.\n\n#### Model.remove(options, callback)\nRemove the instance model.","_id":"p-odm@3.1.3","dist":{"shasum":"1df4a8d39c4b51c6402491b4180d5eedb1bf2d14","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-3.1.3.tgz","integrity":"sha512-TaE9r0DjrgJLEcUrrFGVXdqFulue0bIRamKUnEQMXUIqGPHjS2e/GOhSg95PwOuSFawrrjaXoPgqgtOO05rcEw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHVCiVuBWCtBxSNIw4XltQi8j07mInOPnsV6YJAVXAaGAiBEWVu0mdeTXD0nvn9ndSEqskGzDBJQndUJiw+D4GYyUQ=="}]},"_npmVersion":"1.1.62","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"3.1.4":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model","view"],"contributors":[{"name":"Paulo Lopes"}],"version":"3.1.4","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":"1.1.11","jsonschema":"0.1.3"},"main":"./lib","repository":{"type":"git","url":"https://github.com/pmlopes/p-odm.git"},"readme":"# ODM\n\nODM is a new, innovative and easy way to use MongoDB documents, as Models, in your code.\nIt uses the [JSON schema](http://tools.ietf.org/html/draft-zyp-json-schema-03) standard for validating the documents.\n\n## Quick Start\n\n### Connect\n\n\todm.connect('mongodb://127.0.0.1:27017/simple');\n\n### Define a model\n\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t  }\n\t});\n\n### Embedding other documents\n\nWe embed an address model in person:\n\t\n\t// Address, to be embedded on Person\n\tvar Address = odm.model({\n\t  \"id\": \"Simple#Address\",\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"lines\": {\n\t      \"type\": \"array\",\n\t      \"items\": {\"type\": \"string\"}\n\t    },\n\t    \"zip\": {\"type\": \"string\"},\n\t    \"city\": {\"type\": \"string\"},\n\t    \"country\": {\"type\": \"string\"}\n\t  }\n\t});\n\t\nThe changed person model:\n\t\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t    \"address\": {\"$ref\": \"Simple#Address\"}\n\t  }\n\t});\n\n\n## Methods\n\n### Class methods\n\n#### ODM#parse(jsonString)\nParses a JSON string to a JSON document. It is aware of ISO Dates and ObjectIds and coverts them on the fly.\n\n#### Model#findOne(query, fields, options, callback)\nFinds one document or `fields`, satisfying `query`.\n\n\tPerson.findOne({'name': 'Barack Obama'}, function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#findById(id, fields, options, callback)\nFinds one document by `id`, returining `fields`.\n\n\tPerson.findById(\"4ff3fcf14335e9d6ba000001\", function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#find(query, fields, options, callback)\nFinds all documents or `fields`, satisfying `query`.\n\n\tPerson.find({'name': 'Barack Obama'}, function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\t\n#### Model#findAll(fields, options, callback)\nFinds all documents or `fields`.\n\n\tPerson.findAll(function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\n#### Model#remove(query, options, callback)\nRemoves all documents satisfying `query`.\n\n#### Model#update(query, document, options, callback)\nUpdate all documents satisfying `query`, with document.\n\n#### Model#loadDbRef(id/ids, options, callback)\nLoads one Id or array of ids, it is similar to a simple find, however the number of results and order is the same as the array argument\n\n#### Model#ensureIndex(fieldOrSpec, options, callback)\nAdds an index and will also add a `findByXXX` method, where XXX is the name of the `fieldOrSpec`\n\n### Instance methods\n\n#### Model.validate(verbose)\nReturns true or false, or all errors in case `verbose` is true.\n\n#### Model.save(options, callback)\nSaves the instance model.\n\n\tp.save(function (error, id) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  } \n\t  console.log(id);\n\t});\n\n#### Model.update(query, document, options, callback)\nUpdate the instance model.\n\n#### Model.insert(options, callback)\nInsert the instance model.\n\n#### Model.remove(options, callback)\nRemove the instance model.","_id":"p-odm@3.1.4","dist":{"shasum":"498ec6c6010121d191fc821c0c88c5ee70e4f45c","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-3.1.4.tgz","integrity":"sha512-ngQEPDdwHyidr+421/lwS20NxzSVH6m+MEzRMRj/uNebT0InwDwnFII5/OR1zRjPL4WZpnxND8A1dO54TiNSXA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDCeWinCdW5+Z1bKj4Iq2YoTyYghFJNq4FwQ4y2Qeu+iAIgWUSsudN5Dc6f+eHiRgbJOCvaq561kx5k9uSuN7UELk4="}]},"_npmVersion":"1.1.62","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"3.1.5":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model","view"],"contributors":[{"name":"Paulo Lopes"}],"version":"3.1.5","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":"1.1.11","jsonschema":"0.1.4"},"main":"./lib","repository":{"type":"git","url":"https://github.com/pmlopes/p-odm.git"},"readme":"# ODM\n\nODM is a new, innovative and easy way to use MongoDB documents, as Models, in your code.\nIt uses the [JSON schema](http://tools.ietf.org/html/draft-zyp-json-schema-03) standard for validating the documents.\n\n## Quick Start\n\n### Connect\n\n\todm.connect('mongodb://127.0.0.1:27017/simple');\n\n### Define a model\n\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t  }\n\t});\n\n### Embedding other documents\n\nWe embed an address model in person:\n\t\n\t// Address, to be embedded on Person\n\tvar Address = odm.model({\n\t  \"id\": \"Simple#Address\",\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"lines\": {\n\t      \"type\": \"array\",\n\t      \"items\": {\"type\": \"string\"}\n\t    },\n\t    \"zip\": {\"type\": \"string\"},\n\t    \"city\": {\"type\": \"string\"},\n\t    \"country\": {\"type\": \"string\"}\n\t  }\n\t});\n\t\nThe changed person model:\n\t\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t    \"address\": {\"$ref\": \"Simple#Address\"}\n\t  }\n\t});\n\n\n## Methods\n\n### Class methods\n\n#### ODM#parse(jsonString)\nParses a JSON string to a JSON document. It is aware of ISO Dates and ObjectIds and coverts them on the fly.\n\n#### Model#findOne(query, fields, options, callback)\nFinds one document or `fields`, satisfying `query`.\n\n\tPerson.findOne({'name': 'Barack Obama'}, function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#findById(id, fields, options, callback)\nFinds one document by `id`, returining `fields`.\n\n\tPerson.findById(\"4ff3fcf14335e9d6ba000001\", function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#find(query, fields, options, callback)\nFinds all documents or `fields`, satisfying `query`.\n\n\tPerson.find({'name': 'Barack Obama'}, function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\t\n#### Model#findAll(fields, options, callback)\nFinds all documents or `fields`.\n\n\tPerson.findAll(function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\n#### Model#remove(query, options, callback)\nRemoves all documents satisfying `query`.\n\n#### Model#update(query, document, options, callback)\nUpdate all documents satisfying `query`, with document.\n\n#### Model#loadDbRef(id/ids, options, callback)\nLoads one Id or array of ids, it is similar to a simple find, however the number of results and order is the same as the array argument\n\n#### Model#ensureIndex(fieldOrSpec, options, callback)\nAdds an index and will also add a `findByXXX` method, where XXX is the name of the `fieldOrSpec`\n\n### Instance methods\n\n#### Model.validate(verbose)\nReturns true or false, or all errors in case `verbose` is true.\n\n#### Model.save(options, callback)\nSaves the instance model.\n\n\tp.save(function (error, id) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  } \n\t  console.log(id);\n\t});\n\n#### Model.update(query, document, options, callback)\nUpdate the instance model.\n\n#### Model.insert(options, callback)\nInsert the instance model.\n\n#### Model.remove(options, callback)\nRemove the instance model.","_id":"p-odm@3.1.5","dist":{"shasum":"3d07fbbde7b8eb612946f25ecf5315ac145dac1b","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-3.1.5.tgz","integrity":"sha512-dTJE0z2SW6rN30ANw4PrYhpCjuLrqTzHhM01Bq/kdtcHscQgyMykuUj85jWBia/3N7azKSdVFbym5JJstrjQAw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCiJ2IQo/dsTw7+4n7/k8B+wRS1Fx5ecz+TeQQisDqvCAIgVl9gkgb54/QW1UJnURVhBYDJ9SIFm1uvGmMkw7rDzY0="}]},"_npmVersion":"1.1.62","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"3.1.6":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model","view"],"contributors":[{"name":"Paulo Lopes"}],"version":"3.1.6","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":"1.1.11","jsonschema":"0.1.4"},"main":"./lib","repository":{"type":"git","url":"https://github.com/pmlopes/p-odm.git"},"readme":"# ODM\n\nODM is a new, innovative and easy way to use MongoDB documents, as Models, in your code.\nIt uses the [JSON schema](http://tools.ietf.org/html/draft-zyp-json-schema-03) standard for validating the documents.\n\n## Quick Start\n\n### Connect\n\n\todm.connect('mongodb://127.0.0.1:27017/simple');\n\n### Define a model\n\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t  }\n\t});\n\n### Embedding other documents\n\nWe embed an address model in person:\n\t\n\t// Address, to be embedded on Person\n\tvar Address = odm.model({\n\t  \"id\": \"Simple#Address\",\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"lines\": {\n\t      \"type\": \"array\",\n\t      \"items\": {\"type\": \"string\"}\n\t    },\n\t    \"zip\": {\"type\": \"string\"},\n\t    \"city\": {\"type\": \"string\"},\n\t    \"country\": {\"type\": \"string\"}\n\t  }\n\t});\n\t\nThe changed person model:\n\t\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t    \"address\": {\"$ref\": \"Simple#Address\"}\n\t  }\n\t});\n\n\n## Methods\n\n### Class methods\n\n#### ODM#parse(jsonString)\nParses a JSON string to a JSON document. It is aware of ISO Dates and ObjectIds and coverts them on the fly.\n\n#### Model#findOne(query, fields, options, callback)\nFinds one document or `fields`, satisfying `query`.\n\n\tPerson.findOne({'name': 'Barack Obama'}, function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#findById(id, fields, options, callback)\nFinds one document by `id`, returining `fields`.\n\n\tPerson.findById(\"4ff3fcf14335e9d6ba000001\", function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#find(query, fields, options, callback)\nFinds all documents or `fields`, satisfying `query`.\n\n\tPerson.find({'name': 'Barack Obama'}, function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\t\n#### Model#findAll(fields, options, callback)\nFinds all documents or `fields`.\n\n\tPerson.findAll(function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\n#### Model#remove(query, options, callback)\nRemoves all documents satisfying `query`.\n\n#### Model#update(query, document, options, callback)\nUpdate all documents satisfying `query`, with document.\n\n#### Model#loadDbRef(id/ids, options, callback)\nLoads one Id or array of ids, it is similar to a simple find, however the number of results and order is the same as the array argument\n\n#### Model#ensureIndex(fieldOrSpec, options, callback)\nAdds an index and will also add a `findByXXX` method, where XXX is the name of the `fieldOrSpec`\n\n### Instance methods\n\n#### Model.validate(verbose)\nReturns true or false, or all errors in case `verbose` is true.\n\n#### Model.save(options, callback)\nSaves the instance model.\n\n\tp.save(function (error, id) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  } \n\t  console.log(id);\n\t});\n\n#### Model.update(query, document, options, callback)\nUpdate the instance model.\n\n#### Model.insert(options, callback)\nInsert the instance model.\n\n#### Model.remove(options, callback)\nRemove the instance model.","readmeFilename":"README.md","_id":"p-odm@3.1.6","dist":{"shasum":"1a196b8d0d32515c2cebdacdfe286b37b1c9bd1c","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-3.1.6.tgz","integrity":"sha512-IjLF5CagOrFPoK8OF+i1heGnsYGPqRrWjeiqE9x73gXoQYFS8akdzlHDy6E2qKQF259879/q4f+EkleD30Bggg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAT9lnwKAerSqoFfEYdV/m11aMLYFVcV4IbSXI95ZcyyAiEA+5FuxpZD7ZAe40aJNibVtf4ZIatofCFk34Eaom8Zlsw="}]},"_npmVersion":"1.1.65","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"3.1.7":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model","view"],"contributors":[{"name":"Paulo Lopes"}],"version":"3.1.7","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":"1.1.11","jsonschema":"0.1.4"},"main":"./lib","repository":{"type":"git","url":"https://github.com/pmlopes/p-odm.git"},"readme":"# ODM\n\nODM is a new, innovative and easy way to use MongoDB documents, as Models, in your code.\nIt uses the [JSON schema](http://tools.ietf.org/html/draft-zyp-json-schema-03) standard for validating the documents.\n\n## Quick Start\n\n### Connect\n\n\todm.connect('mongodb://127.0.0.1:27017/simple');\n\n### Define a model\n\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t  }\n\t});\n\n### Embedding other documents\n\nWe embed an address model in person:\n\t\n\t// Address, to be embedded on Person\n\tvar Address = odm.model({\n\t  \"id\": \"Simple#Address\",\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"lines\": {\n\t      \"type\": \"array\",\n\t      \"items\": {\"type\": \"string\"}\n\t    },\n\t    \"zip\": {\"type\": \"string\"},\n\t    \"city\": {\"type\": \"string\"},\n\t    \"country\": {\"type\": \"string\"}\n\t  }\n\t});\n\t\nThe changed person model:\n\t\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t    \"address\": {\"$ref\": \"Simple#Address\"}\n\t  }\n\t});\n\n\n## Methods\n\n### Class methods\n\n#### ODM#parse(jsonString)\nParses a JSON string to a JSON document. It is aware of ISO Dates and ObjectIds and coverts them on the fly.\n\n#### Model#findOne(query, fields, options, callback)\nFinds one document or `fields`, satisfying `query`.\n\n\tPerson.findOne({'name': 'Barack Obama'}, function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#findById(id, fields, options, callback)\nFinds one document by `id`, returining `fields`.\n\n\tPerson.findById(\"4ff3fcf14335e9d6ba000001\", function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#find(query, fields, options, callback)\nFinds all documents or `fields`, satisfying `query`.\n\n\tPerson.find({'name': 'Barack Obama'}, function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\t\n#### Model#findAll(fields, options, callback)\nFinds all documents or `fields`.\n\n\tPerson.findAll(function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\n#### Model#remove(query, options, callback)\nRemoves all documents satisfying `query`.\n\n#### Model#update(query, document, options, callback)\nUpdate all documents satisfying `query`, with document.\n\n#### Model#loadDbRef(id/ids, options, callback)\nLoads one Id or array of ids, it is similar to a simple find, however the number of results and order is the same as the array argument\n\n#### Model#ensureIndex(fieldOrSpec, options, callback)\nAdds an index and will also add a `findByXXX` method, where XXX is the name of the `fieldOrSpec`\n\n### Instance methods\n\n#### Model.validate(verbose)\nReturns true or false, or all errors in case `verbose` is true.\n\n#### Model.save(options, callback)\nSaves the instance model.\n\n\tp.save(function (error, id) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  } \n\t  console.log(id);\n\t});\n\n#### Model.update(query, document, options, callback)\nUpdate the instance model.\n\n#### Model.insert(options, callback)\nInsert the instance model.\n\n#### Model.remove(options, callback)\nRemove the instance model.","readmeFilename":"README.md","_id":"p-odm@3.1.7","dist":{"shasum":"9b08b136aa9856c836289ae1451cbccb6674d8cf","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-3.1.7.tgz","integrity":"sha512-WHjfA+3+WrK4cA0zi9rvrb1nE1fn9B9rrSRbpAYXK3f5ogQiuAMN1+QtSTKPewIOIXAATJAVZur8mkMDVveklA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBvAbp02pJqTb7Kz8sO3bmlr0brVwwM9Mv4gMUb+TkNnAiBub06cWWGrTY/xUJdKmpRmopaGzot/WkY5HGyacGaT3Q=="}]},"_npmVersion":"1.1.65","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"3.1.8":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model","view"],"contributors":[{"name":"Paulo Lopes"}],"version":"3.1.8","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":"1.1.11","jsonschema":"0.1.4"},"main":"./lib","repository":{"type":"git","url":"https://github.com/pmlopes/p-odm.git"},"readme":"# ODM\n\nODM is a new, innovative and easy way to use MongoDB documents, as Models, in your code.\nIt uses the [JSON schema](http://tools.ietf.org/html/draft-zyp-json-schema-03) standard for validating the documents.\n\n## Quick Start\n\n### Connect\n\n\todm.connect('mongodb://127.0.0.1:27017/simple');\n\n### Define a model\n\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t  }\n\t});\n\n### Embedding other documents\n\nWe embed an address model in person:\n\t\n\t// Address, to be embedded on Person\n\tvar Address = odm.model({\n\t  \"id\": \"Simple#Address\",\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"lines\": {\n\t      \"type\": \"array\",\n\t      \"items\": {\"type\": \"string\"}\n\t    },\n\t    \"zip\": {\"type\": \"string\"},\n\t    \"city\": {\"type\": \"string\"},\n\t    \"country\": {\"type\": \"string\"}\n\t  }\n\t});\n\t\nThe changed person model:\n\t\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t    \"address\": {\"$ref\": \"Simple#Address\"}\n\t  }\n\t});\n\n\n## Methods\n\n### Class methods\n\n#### ODM#parse(jsonString)\nParses a JSON string to a JSON document. It is aware of ISO Dates and ObjectIds and coverts them on the fly.\n\n#### Model#findOne(query, fields, options, callback)\nFinds one document or `fields`, satisfying `query`.\n\n\tPerson.findOne({'name': 'Barack Obama'}, function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#findById(id, fields, options, callback)\nFinds one document by `id`, returining `fields`.\n\n\tPerson.findById(\"4ff3fcf14335e9d6ba000001\", function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#find(query, fields, options, callback)\nFinds all documents or `fields`, satisfying `query`.\n\n\tPerson.find({'name': 'Barack Obama'}, function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\t\n#### Model#findAll(fields, options, callback)\nFinds all documents or `fields`.\n\n\tPerson.findAll(function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\n#### Model#remove(query, options, callback)\nRemoves all documents satisfying `query`.\n\n#### Model#update(query, document, options, callback)\nUpdate all documents satisfying `query`, with document.\n\n#### Model#loadDbRef(id/ids, options, callback)\nLoads one Id or array of ids, it is similar to a simple find, however the number of results and order is the same as the array argument\n\n#### Model#ensureIndex(fieldOrSpec, options, callback)\nAdds an index and will also add a `findByXXX` method, where XXX is the name of the `fieldOrSpec`\n\n### Instance methods\n\n#### Model.validate(verbose)\nReturns true or false, or all errors in case `verbose` is true.\n\n#### Model.save(options, callback)\nSaves the instance model.\n\n\tp.save(function (error, id) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  } \n\t  console.log(id);\n\t});\n\n#### Model.update(query, document, options, callback)\nUpdate the instance model.\n\n#### Model.insert(options, callback)\nInsert the instance model.\n\n#### Model.remove(options, callback)\nRemove the instance model.","readmeFilename":"README.md","_id":"p-odm@3.1.8","dist":{"shasum":"92790455525e308390623d2a889664483795bb70","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-3.1.8.tgz","integrity":"sha512-5vzTBkCQkllZGWR2YL6A9vzzK6mLZfyY/wK5M+8ETMjuUZ/wAHnXSqYh9bFJx3ZYgq3XQ5NJLcWMAap8QF4+yw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDosPXX42g1SWdrR1J8TDwn18kFvZ+QpA7hYaSBVAyf4AiEAjVqUz+Z6/Aji7ftYa6xHQ/Azcw4ZkTEwqAvbfSLoMtA="}]},"_npmVersion":"1.1.65","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"directories":{}},"3.1.9":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model","view"],"contributors":[{"name":"Paulo Lopes"}],"version":"3.1.9","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":"1.1.11","jsonschema":"0.1.4"},"main":"./lib","repository":{"type":"git","url":"https://github.com/pmlopes/p-odm.git"},"readme":"# ODM\n\nODM is a new, innovative and easy way to use MongoDB documents, as Models, in your code.\nIt uses the [JSON schema](http://tools.ietf.org/html/draft-zyp-json-schema-03) standard for validating the documents.\n\n## Quick Start\n\n### Connect\n\n\todm.connect('mongodb://127.0.0.1:27017/simple');\n\n### Define a model\n\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t  }\n\t});\n\n### Embedding other documents\n\nWe embed an address model in person:\n\t\n\t// Address, to be embedded on Person\n\tvar Address = odm.model({\n\t  \"id\": \"Simple#Address\",\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"lines\": {\n\t      \"type\": \"array\",\n\t      \"items\": {\"type\": \"string\"}\n\t    },\n\t    \"zip\": {\"type\": \"string\"},\n\t    \"city\": {\"type\": \"string\"},\n\t    \"country\": {\"type\": \"string\"}\n\t  }\n\t});\n\t\nThe changed person model:\n\t\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t    \"address\": {\"$ref\": \"Simple#Address\"}\n\t  }\n\t});\n\n\n## Methods\n\n### Class methods\n\n#### ODM#parse(jsonString)\nParses a JSON string to a JSON document. It is aware of ISO Dates and ObjectIds and coverts them on the fly.\n\n#### Model#findOne(query, fields, options, callback)\nFinds one document or `fields`, satisfying `query`.\n\n\tPerson.findOne({'name': 'Barack Obama'}, function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#findById(id, fields, options, callback)\nFinds one document by `id`, returining `fields`.\n\n\tPerson.findById(\"4ff3fcf14335e9d6ba000001\", function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#find(query, fields, options, callback)\nFinds all documents or `fields`, satisfying `query`.\n\n\tPerson.find({'name': 'Barack Obama'}, function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\t\n#### Model#findAll(fields, options, callback)\nFinds all documents or `fields`.\n\n\tPerson.findAll(function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\n#### Model#remove(query, options, callback)\nRemoves all documents satisfying `query`.\n\n#### Model#update(query, document, options, callback)\nUpdate all documents satisfying `query`, with document.\n\n#### Model#loadDbRef(id/ids, options, callback)\nLoads one Id or array of ids, it is similar to a simple find, however the number of results and order is the same as the array argument\n\n#### Model#ensureIndex(fieldOrSpec, options, callback)\nAdds an index and will also add a `findByXXX` method, where XXX is the name of the `fieldOrSpec`\n\n### Instance methods\n\n#### Model.validate(verbose)\nReturns true or false, or all errors in case `verbose` is true.\n\n#### Model.save(options, callback)\nSaves the instance model.\n\n\tp.save(function (error, id) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  } \n\t  console.log(id);\n\t});\n\n#### Model.update(query, document, options, callback)\nUpdate the instance model.\n\n#### Model.insert(options, callback)\nInsert the instance model.\n\n#### Model.remove(options, callback)\nRemove the instance model.","readmeFilename":"README.md","_id":"p-odm@3.1.9","dist":{"shasum":"5c31ac8e613a63c0ba49df41e51c2a4d3421284e","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-3.1.9.tgz","integrity":"sha512-3B+Cfc5veppQcu64OdiGvijP9LYi6JIq/OCIRGvi7rObyaK2aHSfI+wDaErwWGk9m4eFqRz/z2uSCiP3gYgTXg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCSDCGMhKJGgtmnB0dIOEvp/Ux8BJxqI6YSZ7o0xQOwzAIgacprJ9rP5x9mo8p3wM5yy7wdinp11rqWLTZ5RdhaJX4="}]},"_npmVersion":"1.1.65","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}]},"3.1.10":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model","view"],"contributors":[{"name":"Paulo Lopes"}],"version":"3.1.10","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":"1.2.3","jsonschema":"0.1.5"},"main":"./lib","repository":{"type":"git","url":"https://github.com/pmlopes/p-odm.git"},"readme":"# ODM\n\nODM is a new, innovative and easy way to use MongoDB documents, as Models, in your code.\nIt uses the [JSON schema](http://tools.ietf.org/html/draft-zyp-json-schema-03) standard for validating the documents.\n\n## Quick Start\n\n### Connect\n\n\todm.connect('mongodb://127.0.0.1:27017/simple');\n\n### Define a model\n\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t  }\n\t});\n\n### Embedding other documents\n\nWe embed an address model in person:\n\t\n\t// Address, to be embedded on Person\n\tvar Address = odm.model({\n\t  \"id\": \"Simple#Address\",\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"lines\": {\n\t      \"type\": \"array\",\n\t      \"items\": {\"type\": \"string\"}\n\t    },\n\t    \"zip\": {\"type\": \"string\"},\n\t    \"city\": {\"type\": \"string\"},\n\t    \"country\": {\"type\": \"string\"}\n\t  }\n\t});\n\t\nThe changed person model:\n\t\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t    \"address\": {\"$ref\": \"Simple#Address\"}\n\t  }\n\t});\n\n\n## Methods\n\n### Class methods\n\n#### ODM#parse(jsonString)\nParses a JSON string to a JSON document. It is aware of ISO Dates and ObjectIds and coverts them on the fly.\n\n#### Model#findOne(query, fields, options, callback)\nFinds one document or `fields`, satisfying `query`.\n\n\tPerson.findOne({'name': 'Barack Obama'}, function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#findById(id, fields, options, callback)\nFinds one document by `id`, returining `fields`.\n\n\tPerson.findById(\"4ff3fcf14335e9d6ba000001\", function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#find(query, fields, options, callback)\nFinds all documents or `fields`, satisfying `query`.\n\n\tPerson.find({'name': 'Barack Obama'}, function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\t\n#### Model#findAll(fields, options, callback)\nFinds all documents or `fields`.\n\n\tPerson.findAll(function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\n#### Model#remove(query, options, callback)\nRemoves all documents satisfying `query`.\n\n#### Model#update(query, document, options, callback)\nUpdate all documents satisfying `query`, with document.\n\n#### Model#loadDbRef(id/ids, options, callback)\nLoads one Id or array of ids, it is similar to a simple find, however the number of results and order is the same as the array argument\n\n#### Model#ensureIndex(fieldOrSpec, options, callback)\nAdds an index and will also add a `findByXXX` method, where XXX is the name of the `fieldOrSpec`\n\n### Instance methods\n\n#### Model.validate(verbose)\nReturns true or false, or all errors in case `verbose` is true.\n\n#### Model.save(options, callback)\nSaves the instance model.\n\n\tp.save(function (error, id) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  } \n\t  console.log(id);\n\t});\n\n#### Model.update(query, document, options, callback)\nUpdate the instance model.\n\n#### Model.insert(options, callback)\nInsert the instance model.\n\n#### Model.remove(options, callback)\nRemove the instance model.","readmeFilename":"README.md","_id":"p-odm@3.1.10","dist":{"shasum":"d1978ad1dd7e7350723da1b73317675e0957df4e","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-3.1.10.tgz","integrity":"sha512-Kqfj73FVAmbe6XN5HI6cnfR/l7wX+eBQEgWkzlElp0XVXXvtI47OirD62ICJtdipTGX8ZmeXY4SPKAw4idIZ9A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB8bC+wNf8rBrsk+PJJH6TMYgSEnq0c1qcplSuUngGOsAiEAv2FxJT6utqz18d7h3qTUgSFUgFlIQFGxxEeLPoFKwQA="}]},"_npmVersion":"1.1.65","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}]},"3.1.11":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model","view"],"contributors":[{"name":"Paulo Lopes"}],"version":"3.1.11","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":"1.2.3","jsonschema":"0.2.1"},"main":"./lib","repository":{"type":"git","url":"https://github.com/pmlopes/p-odm.git"},"readme":"# ODM\n\nODM is a new, innovative and easy way to use MongoDB documents, as Models, in your code.\nIt uses the [JSON schema](http://tools.ietf.org/html/draft-zyp-json-schema-03) standard for validating the documents.\n\n## Quick Start\n\n### Connect\n\n\todm.connect('mongodb://127.0.0.1:27017/simple');\n\n### Define a model\n\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t  }\n\t});\n\n### Embedding other documents\n\nWe embed an address model in person:\n\t\n\t// Address, to be embedded on Person\n\tvar Address = odm.model({\n\t  \"id\": \"Simple#Address\",\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"lines\": {\n\t      \"type\": \"array\",\n\t      \"items\": {\"type\": \"string\"}\n\t    },\n\t    \"zip\": {\"type\": \"string\"},\n\t    \"city\": {\"type\": \"string\"},\n\t    \"country\": {\"type\": \"string\"}\n\t  }\n\t});\n\t\nThe changed person model:\n\t\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t    \"address\": {\"$ref\": \"Simple#Address\"}\n\t  }\n\t});\n\n\n## Methods\n\n### Class methods\n\n#### ODM#parse(jsonString)\nParses a JSON string to a JSON document. It is aware of ISO Dates and ObjectIds and coverts them on the fly.\n\n#### Model#findOne(query, fields, options, callback)\nFinds one document or `fields`, satisfying `query`.\n\n\tPerson.findOne({'name': 'Barack Obama'}, function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#findById(id, fields, options, callback)\nFinds one document by `id`, returining `fields`.\n\n\tPerson.findById(\"4ff3fcf14335e9d6ba000001\", function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#find(query, fields, options, callback)\nFinds all documents or `fields`, satisfying `query`.\n\n\tPerson.find({'name': 'Barack Obama'}, function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\t\n#### Model#findAll(fields, options, callback)\nFinds all documents or `fields`.\n\n\tPerson.findAll(function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\n#### Model#remove(query, options, callback)\nRemoves all documents satisfying `query`.\n\n#### Model#update(query, document, options, callback)\nUpdate all documents satisfying `query`, with document.\n\n#### Model#loadDbRef(id/ids, options, callback)\nLoads one Id or array of ids, it is similar to a simple find, however the number of results and order is the same as the array argument\n\n#### Model#ensureIndex(fieldOrSpec, options, callback)\nAdds an index and will also add a `findByXXX` method, where XXX is the name of the `fieldOrSpec`\n\n### Instance methods\n\n#### Model.validate(verbose)\nReturns true or false, or all errors in case `verbose` is true.\n\n#### Model.save(options, callback)\nSaves the instance model.\n\n\tp.save(function (error, id) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  } \n\t  console.log(id);\n\t});\n\n#### Model.update(query, document, options, callback)\nUpdate the instance model.\n\n#### Model.insert(options, callback)\nInsert the instance model.\n\n#### Model.remove(options, callback)\nRemove the instance model.","readmeFilename":"README.md","_id":"p-odm@3.1.11","dist":{"shasum":"686d4694baf25cc4a76f7faeefcfcfb7201612f1","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-3.1.11.tgz","integrity":"sha512-ZKR76Fvyw3YRCMak/8rF+xJYOPahHVPp4Mdgm82MMPlBqRfv9HehKWH6TaQKqu90BUKloneFnMAka/1Q7DaInQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB9MuLgoaezd3JDz3hFgeq2WZfTftregCjR0E9sD/j6GAiEAzH/3QJZR+XcGGsBLWHuGLaeno2/9IGOoxQf+D/hoSUA="}]},"_npmVersion":"1.1.65","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}]},"3.1.12":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model","view"],"contributors":[{"name":"Paulo Lopes"}],"version":"3.1.12","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":"1.2.5","jsonschema":"0.2.1"},"main":"./lib","repository":{"type":"git","url":"https://github.com/pmlopes/p-odm.git"},"readme":"# ODM\n\nODM is a new, innovative and easy way to use MongoDB documents, as Models, in your code.\nIt uses the [JSON schema](http://tools.ietf.org/html/draft-zyp-json-schema-03) standard for validating the documents.\n\n## Quick Start\n\n### Connect\n\n\todm.connect('mongodb://127.0.0.1:27017/simple');\n\n### Define a model\n\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t  }\n\t});\n\n### Embedding other documents\n\nWe embed an address model in person:\n\t\n\t// Address, to be embedded on Person\n\tvar Address = odm.model({\n\t  \"id\": \"Simple#Address\",\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"lines\": {\n\t      \"type\": \"array\",\n\t      \"items\": {\"type\": \"string\"}\n\t    },\n\t    \"zip\": {\"type\": \"string\"},\n\t    \"city\": {\"type\": \"string\"},\n\t    \"country\": {\"type\": \"string\"}\n\t  }\n\t});\n\t\nThe changed person model:\n\t\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t    \"address\": {\"$ref\": \"Simple#Address\"}\n\t  }\n\t});\n\n\n## Methods\n\n### Class methods\n\n#### ODM#parse(jsonString)\nParses a JSON string to a JSON document. It is aware of ISO Dates and ObjectIds and coverts them on the fly.\n\n#### Model#findOne(query, fields, options, callback)\nFinds one document or `fields`, satisfying `query`.\n\n\tPerson.findOne({'name': 'Barack Obama'}, function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#findById(id, fields, options, callback)\nFinds one document by `id`, returining `fields`.\n\n\tPerson.findById(\"4ff3fcf14335e9d6ba000001\", function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#find(query, fields, options, callback)\nFinds all documents or `fields`, satisfying `query`.\n\n\tPerson.find({'name': 'Barack Obama'}, function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\t\n#### Model#findAll(fields, options, callback)\nFinds all documents or `fields`.\n\n\tPerson.findAll(function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\n#### Model#remove(query, options, callback)\nRemoves all documents satisfying `query`.\n\n#### Model#update(query, document, options, callback)\nUpdate all documents satisfying `query`, with document.\n\n#### Model#loadDbRef(id/ids, options, callback)\nLoads one Id or array of ids, it is similar to a simple find, however the number of results and order is the same as the array argument\n\n#### Model#ensureIndex(fieldOrSpec, options, callback)\nAdds an index and will also add a `findByXXX` method, where XXX is the name of the `fieldOrSpec`\n\n### Instance methods\n\n#### Model.validate(verbose)\nReturns true or false, or all errors in case `verbose` is true.\n\n#### Model.save(options, callback)\nSaves the instance model.\n\n\tp.save(function (error, id) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  } \n\t  console.log(id);\n\t});\n\n#### Model.update(query, document, options, callback)\nUpdate the instance model.\n\n#### Model.insert(options, callback)\nInsert the instance model.\n\n#### Model.remove(options, callback)\nRemove the instance model.","readmeFilename":"README.md","_id":"p-odm@3.1.12","dist":{"shasum":"8ffffe8e9a702520d465d55dcfb0cde65c04dac2","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-3.1.12.tgz","integrity":"sha512-tknCKRctN6/EuDCZwz2Q8KmNMSS86JNurw3dBJIxodwXnI210mbOxrmL1onbnxbVSQGsNlyostadOELvkADJUQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEj7Mmy2spYnX1nsaRO21TW6wZSlnjgUASzBR1humba+AiBaNo2tMfx20Gh8vWfAGurFAf++PvEQr0VL4L23zsT3Uw=="}]},"_npmVersion":"1.1.65","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}]},"3.1.13":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model","view"],"contributors":[{"name":"Paulo Lopes"}],"version":"3.1.13","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":"1.2.5","jsonschema":"0.3.1"},"main":"./lib","repository":{"type":"git","url":"https://github.com/pmlopes/p-odm.git"},"readme":"# ODM\n\nODM is a new, innovative and easy way to use MongoDB documents, as Models, in your code.\nIt uses the [JSON schema](http://tools.ietf.org/html/draft-zyp-json-schema-03) standard for validating the documents.\n\n## Quick Start\n\n### Connect\n\n\todm.connect('mongodb://127.0.0.1:27017/simple');\n\n### Define a model\n\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t  }\n\t});\n\n### Embedding other documents\n\nWe embed an address model in person:\n\t\n\t// Address, to be embedded on Person\n\tvar Address = odm.model({\n\t  \"id\": \"Simple#Address\",\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"lines\": {\n\t      \"type\": \"array\",\n\t      \"items\": {\"type\": \"string\"}\n\t    },\n\t    \"zip\": {\"type\": \"string\"},\n\t    \"city\": {\"type\": \"string\"},\n\t    \"country\": {\"type\": \"string\"}\n\t  }\n\t});\n\t\nThe changed person model:\n\t\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t    \"address\": {\"$ref\": \"Simple#Address\"}\n\t  }\n\t});\n\n\n## Methods\n\n### Class methods\n\n#### ODM#parse(jsonString)\nParses a JSON string to a JSON document. It is aware of ISO Dates and ObjectIds and coverts them on the fly.\n\n#### Model#findOne(query, fields, options, callback)\nFinds one document or `fields`, satisfying `query`.\n\n\tPerson.findOne({'name': 'Barack Obama'}, function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#findById(id, fields, options, callback)\nFinds one document by `id`, returining `fields`.\n\n\tPerson.findById(\"4ff3fcf14335e9d6ba000001\", function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#find(query, fields, options, callback)\nFinds all documents or `fields`, satisfying `query`.\n\n\tPerson.find({'name': 'Barack Obama'}, function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\t\n#### Model#findAll(fields, options, callback)\nFinds all documents or `fields`.\n\n\tPerson.findAll(function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\n#### Model#remove(query, options, callback)\nRemoves all documents satisfying `query`.\n\n#### Model#update(query, document, options, callback)\nUpdate all documents satisfying `query`, with document.\n\n#### Model#loadDbRef(id/ids, options, callback)\nLoads one Id or array of ids, it is similar to a simple find, however the number of results and order is the same as the array argument\n\n#### Model#ensureIndex(fieldOrSpec, options, callback)\nAdds an index and will also add a `findByXXX` method, where XXX is the name of the `fieldOrSpec`\n\n### Instance methods\n\n#### Model.validate(verbose)\nReturns true or false, or all errors in case `verbose` is true.\n\n#### Model.save(options, callback)\nSaves the instance model.\n\n\tp.save(function (error, id) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  } \n\t  console.log(id);\n\t});\n\n#### Model.update(query, document, options, callback)\nUpdate the instance model.\n\n#### Model.insert(options, callback)\nInsert the instance model.\n\n#### Model.remove(options, callback)\nRemove the instance model.","readmeFilename":"README.md","_id":"p-odm@3.1.13","dist":{"shasum":"2c390d8c0542776d952547db8f27319e318f605b","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-3.1.13.tgz","integrity":"sha512-zA5Af4ir294OxQ6Cso6bH3T6CwRLRAGL1EHalPqNj6gJBKnVvzuglpamvmrZRMqpkTUec3TyWTuyGXZnOMXJoQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHH7/OjHh3fqkx5UkYiujIDmBNS/O8ynKYljFx5JhNK8AiEA7unRMW9x9SYWlWiEeLl5s+T7eQ4RhakT9VRslCS7sIg="}]},"_npmVersion":"1.1.65","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}]},"3.1.14":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model","view"],"contributors":[{"name":"Paulo Lopes"}],"version":"3.1.14","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":"1.2.5","jsonschema":"0.3.2"},"main":"./lib","repository":{"type":"git","url":"https://github.com/pmlopes/p-odm.git"},"readme":"# ODM\n\nODM is a new, innovative and easy way to use MongoDB documents, as Models, in your code.\nIt uses the [JSON schema](http://tools.ietf.org/html/draft-zyp-json-schema-03) standard for validating the documents.\n\n## Quick Start\n\n### Connect\n\n\todm.connect('mongodb://127.0.0.1:27017/simple');\n\n### Define a model\n\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t  }\n\t});\n\n### Embedding other documents\n\nWe embed an address model in person:\n\t\n\t// Address, to be embedded on Person\n\tvar Address = odm.model({\n\t  \"id\": \"Simple#Address\",\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"lines\": {\n\t      \"type\": \"array\",\n\t      \"items\": {\"type\": \"string\"}\n\t    },\n\t    \"zip\": {\"type\": \"string\"},\n\t    \"city\": {\"type\": \"string\"},\n\t    \"country\": {\"type\": \"string\"}\n\t  }\n\t});\n\t\nThe changed person model:\n\t\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t    \"address\": {\"$ref\": \"Simple#Address\"}\n\t  }\n\t});\n\n\n## Methods\n\n### Class methods\n\n#### ODM#parse(jsonString)\nParses a JSON string to a JSON document. It is aware of ISO Dates and ObjectIds and coverts them on the fly.\n\n#### Model#findOne(query, fields, options, callback)\nFinds one document or `fields`, satisfying `query`.\n\n\tPerson.findOne({'name': 'Barack Obama'}, function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#findById(id, fields, options, callback)\nFinds one document by `id`, returining `fields`.\n\n\tPerson.findById(\"4ff3fcf14335e9d6ba000001\", function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#find(query, fields, options, callback)\nFinds all documents or `fields`, satisfying `query`.\n\n\tPerson.find({'name': 'Barack Obama'}, function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\t\n#### Model#findAll(fields, options, callback)\nFinds all documents or `fields`.\n\n\tPerson.findAll(function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\n#### Model#remove(query, options, callback)\nRemoves all documents satisfying `query`.\n\n#### Model#update(query, document, options, callback)\nUpdate all documents satisfying `query`, with document.\n\n#### Model#loadDbRef(id/ids, options, callback)\nLoads one Id or array of ids, it is similar to a simple find, however the number of results and order is the same as the array argument\n\n#### Model#ensureIndex(fieldOrSpec, options, callback)\nAdds an index and will also add a `findByXXX` method, where XXX is the name of the `fieldOrSpec`\n\n### Instance methods\n\n#### Model.validate(verbose)\nReturns true or false, or all errors in case `verbose` is true.\n\n#### Model.save(options, callback)\nSaves the instance model.\n\n\tp.save(function (error, id) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  } \n\t  console.log(id);\n\t});\n\n#### Model.update(query, document, options, callback)\nUpdate the instance model.\n\n#### Model.insert(options, callback)\nInsert the instance model.\n\n#### Model.remove(options, callback)\nRemove the instance model.","readmeFilename":"README.md","_id":"p-odm@3.1.14","dist":{"shasum":"47d83cc54effcea4a2f7e0efda5ac4a8ca74c0ad","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-3.1.14.tgz","integrity":"sha512-ivi9GLMGalYaJxEtoBzLqwOPIUue92ssB0xIJ6FHnPM2BeE8bJMfpjBLY65pHPXZOoG7/hVaAwxu2NvUNi23rA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFsr4Jd4GXcWw2JDLOelZ/nMoJUtIGj5SResYyf6bq4FAiAlLil5pWQ0xZwFEx/dtTviJBv34BUhdijs86B5Wwp4bw=="}]},"_npmVersion":"1.1.65","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}]},"3.1.15":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model","view"],"contributors":[{"name":"Paulo Lopes"}],"version":"3.1.15","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":"1.2.12","jsonschema":"0.3.2"},"main":"./lib","repository":{"type":"git","url":"https://github.com/pmlopes/p-odm.git"},"readme":"# ODM\n\nODM is a new, innovative and easy way to use MongoDB documents, as Models, in your code.\nIt uses the [JSON schema](http://tools.ietf.org/html/draft-zyp-json-schema-03) standard for validating the documents.\n\n## Quick Start\n\n### Connect\n\n\todm.connect('mongodb://127.0.0.1:27017/simple');\n\n### Define a model\n\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t  }\n\t});\n\n### Embedding other documents\n\nWe embed an address model in person:\n\t\n\t// Address, to be embedded on Person\n\tvar Address = odm.model({\n\t  \"id\": \"Simple#Address\",\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"lines\": {\n\t      \"type\": \"array\",\n\t      \"items\": {\"type\": \"string\"}\n\t    },\n\t    \"zip\": {\"type\": \"string\"},\n\t    \"city\": {\"type\": \"string\"},\n\t    \"country\": {\"type\": \"string\"}\n\t  }\n\t});\n\t\nThe changed person model:\n\t\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t    \"address\": {\"$ref\": \"Simple#Address\"}\n\t  }\n\t});\n\n\n## Methods\n\n### Class methods\n\n#### ODM#parse(jsonString)\nParses a JSON string to a JSON document. It is aware of ISO Dates and ObjectIds and coverts them on the fly.\n\n#### Model#findOne(query, fields, options, callback)\nFinds one document or `fields`, satisfying `query`.\n\n\tPerson.findOne({'name': 'Barack Obama'}, function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#findById(id, fields, options, callback)\nFinds one document by `id`, returining `fields`.\n\n\tPerson.findById(\"4ff3fcf14335e9d6ba000001\", function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#find(query, fields, options, callback)\nFinds all documents or `fields`, satisfying `query`.\n\n\tPerson.find({'name': 'Barack Obama'}, function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\t\n#### Model#findAll(fields, options, callback)\nFinds all documents or `fields`.\n\n\tPerson.findAll(function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\n#### Model#remove(query, options, callback)\nRemoves all documents satisfying `query`.\n\n#### Model#update(query, document, options, callback)\nUpdate all documents satisfying `query`, with document.\n\n#### Model#loadDbRef(id/ids, options, callback)\nLoads one Id or array of ids, it is similar to a simple find, however the number of results and order is the same as the array argument\n\n#### Model#ensureIndex(fieldOrSpec, options, callback)\nAdds an index and will also add a `findByXXX` method, where XXX is the name of the `fieldOrSpec`\n\n### Instance methods\n\n#### Model.validate(verbose)\nReturns true or false, or all errors in case `verbose` is true.\n\n#### Model.save(options, callback)\nSaves the instance model.\n\n\tp.save(function (error, id) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  } \n\t  console.log(id);\n\t});\n\n#### Model.update(query, document, options, callback)\nUpdate the instance model.\n\n#### Model.insert(options, callback)\nInsert the instance model.\n\n#### Model.remove(options, callback)\nRemove the instance model.","readmeFilename":"README.md","_id":"p-odm@3.1.15","dist":{"shasum":"3edaf974c8869abba9c0529ee4e913878f7b2846","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-3.1.15.tgz","integrity":"sha512-6+JxK7e70lE1kZ5fZF5qCA7M5tezKAyFAhLNmt9AWkeE0Ey4hDdK4m95AA/S+WPCH8zQXKOv2zERj8AvqkOQlw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCrfc8e5w2F8oCtZWjwcyWAojYX7wKJT8eLo3zijd3iOAIhAKQ5GG9/5aHS1s+Ez2pqpvsOLlV+dcGb79TwFL0d7OGA"}]},"_from":"p-odm","_npmVersion":"1.2.10","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}]},"3.1.16":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model","view"],"contributors":[{"name":"Paulo Lopes"}],"version":"3.1.16","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":"1.2.12","jsonschema":"0.3.2"},"main":"./lib","repository":{"type":"git","url":"https://github.com/pmlopes/p-odm.git"},"readme":"# ODM\n\nODM is a new, innovative and easy way to use MongoDB documents, as Models, in your code.\nIt uses the [JSON schema](http://tools.ietf.org/html/draft-zyp-json-schema-03) standard for validating the documents.\n\n## Quick Start\n\n### Connect\n\n\todm.connect('mongodb://127.0.0.1:27017/simple');\n\n### Define a model\n\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t  }\n\t});\n\n### Embedding other documents\n\nWe embed an address model in person:\n\t\n\t// Address, to be embedded on Person\n\tvar Address = odm.model({\n\t  \"id\": \"Simple#Address\",\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"lines\": {\n\t      \"type\": \"array\",\n\t      \"items\": {\"type\": \"string\"}\n\t    },\n\t    \"zip\": {\"type\": \"string\"},\n\t    \"city\": {\"type\": \"string\"},\n\t    \"country\": {\"type\": \"string\"}\n\t  }\n\t});\n\t\nThe changed person model:\n\t\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t    \"address\": {\"$ref\": \"Simple#Address\"}\n\t  }\n\t});\n\n\n## Methods\n\n### Class methods\n\n#### ODM#parse(jsonString)\nParses a JSON string to a JSON document. It is aware of ISO Dates and ObjectIds and coverts them on the fly.\n\n#### Model#findOne(query, fields, options, callback)\nFinds one document or `fields`, satisfying `query`.\n\n\tPerson.findOne({'name': 'Barack Obama'}, function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#findById(id, fields, options, callback)\nFinds one document by `id`, returining `fields`.\n\n\tPerson.findById(\"4ff3fcf14335e9d6ba000001\", function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#find(query, fields, options, callback)\nFinds all documents or `fields`, satisfying `query`.\n\n\tPerson.find({'name': 'Barack Obama'}, function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\t\n#### Model#findAll(fields, options, callback)\nFinds all documents or `fields`.\n\n\tPerson.findAll(function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\n#### Model#remove(query, options, callback)\nRemoves all documents satisfying `query`.\n\n#### Model#update(query, document, options, callback)\nUpdate all documents satisfying `query`, with document.\n\n#### Model#loadDbRef(id/ids, options, callback)\nLoads one Id or array of ids, it is similar to a simple find, however the number of results and order is the same as the array argument\n\n#### Model#ensureIndex(fieldOrSpec, options, callback)\nAdds an index and will also add a `findByXXX` method, where XXX is the name of the `fieldOrSpec`\n\n### Instance methods\n\n#### Model.validate(verbose)\nReturns true or false, or all errors in case `verbose` is true.\n\n#### Model.save(options, callback)\nSaves the instance model.\n\n\tp.save(function (error, id) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  } \n\t  console.log(id);\n\t});\n\n#### Model.update(query, document, options, callback)\nUpdate the instance model.\n\n#### Model.insert(options, callback)\nInsert the instance model.\n\n#### Model.remove(options, callback)\nRemove the instance model.","readmeFilename":"README.md","_id":"p-odm@3.1.16","dist":{"shasum":"d719b66375ecf469ca695edd816034a55198ab16","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-3.1.16.tgz","integrity":"sha512-Q9VUKkIURafZoQCVRsvEU1LQslrIHtf8kOACZ1cDTEfiwtshI2UqkqN0yHicLwiQgNJYGMwondorTo6+zAz1Ew==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBtVNddJTydXoSS8c9v+2i7zbatuJqk3oslrimSIVx5dAiBk4k+TLR5X2zv2AnA87mVeO8z5wfeLB1z5/+TSc7bC8A=="}]},"_from":"p-odm","_npmVersion":"1.2.11","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}]},"3.1.17":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model","view"],"contributors":[{"name":"Paulo Lopes"}],"version":"3.1.17","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":"1.2.12","jsonschema":"0.3.2"},"main":"./lib","repository":{"type":"git","url":"https://github.com/pmlopes/p-odm.git"},"readme":"# ODM\n\nODM is a new, innovative and easy way to use MongoDB documents, as Models, in your code.\nIt uses the [JSON schema](http://tools.ietf.org/html/draft-zyp-json-schema-03) standard for validating the documents.\n\n## Quick Start\n\n### Connect\n\n\todm.connect('mongodb://127.0.0.1:27017/simple');\n\n### Define a model\n\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t  }\n\t});\n\n### Embedding other documents\n\nWe embed an address model in person:\n\t\n\t// Address, to be embedded on Person\n\tvar Address = odm.model({\n\t  \"id\": \"Simple#Address\",\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"lines\": {\n\t      \"type\": \"array\",\n\t      \"items\": {\"type\": \"string\"}\n\t    },\n\t    \"zip\": {\"type\": \"string\"},\n\t    \"city\": {\"type\": \"string\"},\n\t    \"country\": {\"type\": \"string\"}\n\t  }\n\t});\n\t\nThe changed person model:\n\t\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t    \"address\": {\"$ref\": \"Simple#Address\"}\n\t  }\n\t});\n\n\n## Methods\n\n### Class methods\n\n#### ODM#parse(jsonString)\nParses a JSON string to a JSON document. It is aware of ISO Dates and ObjectIds and coverts them on the fly.\n\n#### Model#findOne(query, fields, options, callback)\nFinds one document or `fields`, satisfying `query`.\n\n\tPerson.findOne({'name': 'Barack Obama'}, function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#findById(id, fields, options, callback)\nFinds one document by `id`, returining `fields`.\n\n\tPerson.findById(\"4ff3fcf14335e9d6ba000001\", function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#find(query, fields, options, callback)\nFinds all documents or `fields`, satisfying `query`.\n\n\tPerson.find({'name': 'Barack Obama'}, function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\t\n#### Model#findAll(fields, options, callback)\nFinds all documents or `fields`.\n\n\tPerson.findAll(function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\n#### Model#remove(query, options, callback)\nRemoves all documents satisfying `query`.\n\n#### Model#update(query, document, options, callback)\nUpdate all documents satisfying `query`, with document.\n\n#### Model#loadDbRef(id/ids, options, callback)\nLoads one Id or array of ids, it is similar to a simple find, however the number of results and order is the same as the array argument\n\n#### Model#ensureIndex(fieldOrSpec, options, callback)\nAdds an index and will also add a `findByXXX` method, where XXX is the name of the `fieldOrSpec`\n\n### Instance methods\n\n#### Model.validate(verbose)\nReturns true or false, or all errors in case `verbose` is true.\n\n#### Model.save(options, callback)\nSaves the instance model.\n\n\tp.save(function (error, id) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  } \n\t  console.log(id);\n\t});\n\n#### Model.update(query, document, options, callback)\nUpdate the instance model.\n\n#### Model.insert(options, callback)\nInsert the instance model.\n\n#### Model.remove(options, callback)\nRemove the instance model.","readmeFilename":"README.md","_id":"p-odm@3.1.17","dist":{"shasum":"b9218a99760420d19f1645f735afa502f09affa3","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-3.1.17.tgz","integrity":"sha512-Nx6QrisokWKcNy+vZ0felaBQlmse6Q6MOnLkYwTNVhhKvAcS8Ezh2staLuhT59o08OKTYSDBBrijW26mxuJuxA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDycAxX4TMpvasxKbyJSwEXhKm3Msmw7vUTCZpoF5smPQIhAIRln40HIb3s0oPu/E1NY42yCLlMMq1JeERuPl4fZM/r"}]},"_from":"p-odm","_npmVersion":"1.2.11","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}]},"3.1.18":{"name":"p-odm","description":"ODM mongodb library for node.js","keywords":["mongodb","database","mongo","model","view"],"contributors":[{"name":"Paulo Lopes"}],"version":"3.1.18","engines":{"node":">=0.4.12"},"dependencies":{"mongodb":"1.2.14","jsonschema":"0.3.2"},"main":"./lib","repository":{"type":"git","url":"https://github.com/pmlopes/p-odm.git"},"readme":"# ODM\n\nODM is a new, innovative and easy way to use MongoDB documents, as Models, in your code.\nIt uses the [JSON schema](http://tools.ietf.org/html/draft-zyp-json-schema-03) standard for validating the documents.\n\n## Quick Start\n\n### Connect\n\n\todm.connect('mongodb://127.0.0.1:27017/simple');\n\n### Define a model\n\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t  }\n\t});\n\n### Embedding other documents\n\nWe embed an address model in person:\n\t\n\t// Address, to be embedded on Person\n\tvar Address = odm.model({\n\t  \"id\": \"Simple#Address\",\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"lines\": {\n\t      \"type\": \"array\",\n\t      \"items\": {\"type\": \"string\"}\n\t    },\n\t    \"zip\": {\"type\": \"string\"},\n\t    \"city\": {\"type\": \"string\"},\n\t    \"country\": {\"type\": \"string\"}\n\t  }\n\t});\n\t\nThe changed person model:\n\t\n\tvar Person = odm.model(\"persons\", {\n\t  \"type\" : \"object\",\n\t  \"properties\": {\n\t    \"name\": {\"type\": \"string\"},\n\t    \"address\": {\"$ref\": \"Simple#Address\"}\n\t  }\n\t});\n\n\n## Methods\n\n### Class methods\n\n#### ODM#parse(jsonString)\nParses a JSON string to a JSON document. It is aware of ISO Dates and ObjectIds and coverts them on the fly.\n\n#### Model#findOne(query, fields, options, callback)\nFinds one document or `fields`, satisfying `query`.\n\n\tPerson.findOne({'name': 'Barack Obama'}, function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#findById(id, fields, options, callback)\nFinds one document by `id`, returining `fields`.\n\n\tPerson.findById(\"4ff3fcf14335e9d6ba000001\", function (error, document) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(document);\n\t});\n#### Model#find(query, fields, options, callback)\nFinds all documents or `fields`, satisfying `query`.\n\n\tPerson.find({'name': 'Barack Obama'}, function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\t\n#### Model#findAll(fields, options, callback)\nFinds all documents or `fields`.\n\n\tPerson.findAll(function (error, documents) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  }\n\t  console.log(documents);\n\t});\n\n#### Model#remove(query, options, callback)\nRemoves all documents satisfying `query`.\n\n#### Model#update(query, document, options, callback)\nUpdate all documents satisfying `query`, with document.\n\n#### Model#loadDbRef(id/ids, options, callback)\nLoads one Id or array of ids, it is similar to a simple find, however the number of results and order is the same as the array argument\n\n#### Model#ensureIndex(fieldOrSpec, options, callback)\nAdds an index and will also add a `findByXXX` method, where XXX is the name of the `fieldOrSpec`\n\n### Instance methods\n\n#### Model.validate(verbose)\nReturns true or false, or all errors in case `verbose` is true.\n\n#### Model.save(options, callback)\nSaves the instance model.\n\n\tp.save(function (error, id) {\n\t  if (error) {\n\t    console.log(\"error\", error);\n\t  } \n\t  console.log(id);\n\t});\n\n#### Model.update(query, document, options, callback)\nUpdate the instance model.\n\n#### Model.insert(options, callback)\nInsert the instance model.\n\n#### Model.remove(options, callback)\nRemove the instance model.","readmeFilename":"README.md","_id":"p-odm@3.1.18","dist":{"shasum":"dfb13e66d9a9630dca8c5bb3ffafbbae8f47bc76","tarball":"https://registry.npmjs.org/p-odm/-/p-odm-3.1.18.tgz","integrity":"sha512-yQ3ZRZTtL6KaLziujjDM4pg927UkQ1EAkVW1ameDTNKyC14GcDKKh91WnJP9kg9xbPWP/wVG2UWsc7rr7HBDeA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDvu50+BPXEUDtQG76y8EqvxvXpC7ICD1VFjr6cr4Wq6gIhAIYxtqStW1coEtPpins0J38AqMDN98VKD63nyfonN6Tx"}]},"_from":"p-odm","_npmVersion":"1.2.14","_npmUser":{"name":"pmlopes","email":"pmlopes@gmail.com"},"maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}]}},"readme":"ODM.js - Object Document mongodb library for node.js\n=================================================\n\nWhat is ODM.js?\n------------------\n\n`ODM.js` is a minimalistic wrapper around the excelent `node-mongodb-native` driver. It's easy to use and pretty small. ODM's design is centered on:\n\n1. Simplicity\n2. Proper Error Handling and Recovery using callbacks\n3. Use of common idioms\n\nLicense\n-------\n\nODM is distributed under a MIT license. See the LICENSE file for more information.\n\nInstallation\n============\n\n`ODM.js` can be easily installed through NPM:\n\n    npm install odm\n\nUsage\n=====\n\n    var ODM = require('ODM')\n\nSample Application/Quick Guide\n==============================\n\n### Hello World\n    \n    var User = ODM.model('users', {name: String, Birthday: Date});\n    User.findAll(function(err, users) {\n      for(var i=0; i<users.length; i++) {\n        console.log(users[i]);\n      }\n    });\n    \nThis is arguably the simplest working program you can write using `ODM.js`.\n\nThe code above fetches all the documents from the collection named `users`, and prints their contents (Name and Birthday).\n\nAPI\n---\n\nThis section provides a quick overview of the ODM API. For detailed descriptons of the different commands mongodb provides, please check their documentation.\n\n### ODM Module\n\n*   **ODM.connect(connection_string)** - Configures the lazy connector to know where to connect\n\n### Model\n\n`Model` objects can be obtained through the `ODM#model` method:\n\n#### Static methods\n\n*   **new Model([data[, options]])** - Create a new model instance\n*   **Model#find(query, callback)** - Find documents and wrap them in models\n*   **Model#findAll(callback)** - Find documents and wrap them in models\n*   **Model#findOne(query, callback)** - Find the first document and wrap it in a model\n*   **Model#findById(query, callback)** - Find the first document and wrap it in a model\n\n#### Instance methods\n\n*   **Model#save()** - Persist the model back into the database\n*   **Model#remove()** - Delete the object from the database\n*   **Model#toJSON()** - Serialize a model to a JSON object\n","maintainers":[{"name":"pmlopes","email":"pmlopes@gmail.com"}],"time":{"modified":"2022-07-13T14:50:06.397Z","created":"2012-02-23T10:03:48.920Z","0.0.1":"2012-02-23T10:03:51.027Z","0.0.2":"2012-04-06T12:58:02.018Z","0.0.3":"2012-04-12T15:09:16.840Z","0.0.4":"2012-04-18T08:57:52.872Z","0.0.5":"2012-04-18T10:35:30.951Z","0.0.6":"2012-04-25T11:29:34.124Z","0.0.7":"2012-04-26T08:12:16.425Z","0.0.8":"2012-04-26T11:15:21.915Z","0.0.9":"2012-04-26T12:08:16.017Z","0.0.10":"2012-05-02T09:05:27.146Z","0.0.11":"2012-05-02T09:39:52.060Z","0.0.12":"2012-05-02T13:12:48.413Z","0.0.13":"2012-05-04T12:48:42.741Z","0.0.14":"2012-05-10T14:00:49.321Z","0.0.15":"2012-05-10T14:26:03.398Z","0.0.16":"2012-05-15T09:43:43.606Z","0.0.17":"2012-05-15T12:41:57.884Z","0.0.18":"2012-05-15T13:18:51.225Z","0.0.19":"2012-05-22T07:16:57.850Z","0.0.20":"2012-05-24T08:55:13.994Z","0.0.21":"2012-05-24T12:50:25.990Z","0.0.22":"2012-05-25T08:04:13.900Z","0.0.23":"2012-05-31T12:55:18.242Z","0.0.24":"2012-06-05T07:59:52.979Z","0.0.25":"2012-06-08T09:09:06.408Z","0.0.26":"2012-06-08T14:03:41.352Z","0.0.27":"2012-06-14T15:26:32.039Z","3.0.0":"2012-07-20T13:32:07.363Z","3.0.1":"2012-07-25T13:25:48.566Z","3.0.2":"2012-07-31T10:08:32.307Z","3.0.3":"2012-08-07T10:49:22.164Z","3.0.4":"2012-08-07T13:38:15.877Z","3.0.5":"2012-08-08T07:23:54.694Z","3.0.6":"2012-08-08T10:36:51.766Z","3.0.7":"2012-08-08T12:00:39.152Z","3.0.8":"2012-08-16T10:11:55.701Z","3.0.9":"2012-08-16T15:19:38.963Z","3.0.10":"2012-08-28T08:33:50.496Z","3.1.0":"2012-08-28T13:23:59.066Z","3.1.1":"2012-08-30T07:40:57.303Z","3.1.2":"2012-09-20T12:56:34.558Z","3.1.3":"2012-10-11T09:37:52.753Z","3.1.4":"2012-10-16T10:53:46.933Z","3.1.5":"2012-10-16T13:52:33.167Z","3.1.6":"2012-11-07T10:50:36.695Z","3.1.7":"2012-11-07T13:09:29.684Z","3.1.8":"2012-11-08T12:30:34.134Z","3.1.9":"2012-11-20T13:08:37.889Z","3.1.10":"2012-12-12T11:10:58.827Z","3.1.11":"2012-12-12T13:29:44.935Z","3.1.12":"2012-12-13T08:45:02.772Z","3.1.13":"2012-12-18T15:13:54.450Z","3.1.14":"2012-12-19T10:01:03.609Z","3.1.15":"2013-02-15T11:37:34.016Z","3.1.16":"2013-02-18T14:56:44.998Z","3.1.17":"2013-02-18T18:20:41.743Z","3.1.18":"2013-03-18T18:58:02.298Z"},"repository":{"type":"git","url":"https://github.com/pmlopes/p-odm.git"},"users":{"fgribreau":true}}