{"id":167,"date":"2015-07-14T18:03:59","date_gmt":"2015-07-14T18:03:59","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/nodejs-odm-couchbase-ottoman\/"},"modified":"2015-07-14T18:03:59","modified_gmt":"2015-07-14T18:03:59","slug":"nodejs-odm-couchbase-ottoman","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/pt\/nodejs-odm-couchbase-ottoman\/","title":{"rendered":"Node.js ODM for Couchbase (Ottoman)"},"content":{"rendered":"<p>A few months back, I was talking with some of the users of our Node.js client and heard a fairly standard opinion that people were looking for some method to simplify their life further when using Couchbase from Node.js.\u00a0 One particular things that I heard a lot about was they were looking for some way to have automatically generated models to avoid needing to manually build up all the boilerplate themselves.<\/p>\n\n\n\n<p>In response to this, I started working on a new library known as Ottoman.\u00a0 Ottoman is an experimental ODM designed around Couchbase. \u00a0\u00a0At this point I feel that Ottoman is sufficiently feature rich to begin having some external eyes taking a look.\u00a0 I know that there are bugs hiding out in the source, and features that could be enhanced but I&#8217;d like your help to do it!\u00a0 You&#8217;re the one with the best idea of what you want to see and what would be most beneficial to YOU, so I want to hear from you with as many of the questions, comments and\/or concerns you might have.<\/p>\n\n\n\n<p>Onwards with some explanations!\u00a0<\/p>\n\n\n\n<p>The library is meant to allow you to build a definition of what your model would look like, and then have it auto-generate all the boilerplate that usually goes with this.\u00a0 As an example, take a look at the following:<\/p>\n\n\n\n<p><span>var<\/span> User <span>=<\/span> Ottoman.<span>model<\/span><span>(<\/span><span>&#8216;User&#8217;<\/span><span>,<\/span> <span>{<\/span><br>\u00a0 <span>&#8216;username&#8217;<\/span><span>:<\/span> <span>&#8216;string&#8217;<\/span><span>,<\/span><br>\u00a0 <span>&#8216;name&#8217;<\/span><span>:<\/span> <span>&#8216;string&#8217;<\/span><span>,<\/span><br>\u00a0 <span>&#8217;email&#8217;<\/span><span>:<\/span> <span>&#8216;string&#8217;<\/span><br><span>}<\/span><span>,<\/span> <span>{<\/span><br>\u00a0 bucket<span>:<\/span> <span>new<\/span> couchbase.<span>Connection<\/span><span>(<\/span><span>{<\/span><span>}<\/span><span>)<\/span><br><span>}<\/span><span>)<\/span><span>;<\/span><\/p>\n\n\n\n<p>This example shows how to create a simple User model, which contains 5 fields (yes 5, I will explain this below).\u00a0 It intuitively contains a 3 string fields, which are username, name and email.\u00a0 Additionally, there are 2 `hidden` fields which are added on and which can be overridden.\u00a0 These fields are the _type and _id fields, which contain a string of what model this document is, as well as a uniquely identifying string, which defaults to using a UUIDv4 uuid.<\/p>\n\n\n\n<p>Using this newly created model is extremely simple as the return object from the model function is a function that can be used to instantiate new instances of the model.\u00a0 So following the example above, we can create and save a new user with the following:<\/p>\n\n\n\n<p><span>var<\/span> test <span>=<\/span> <span>new<\/span> User<span>(<\/span><span>)<\/span><span>;<\/span><br>test.<span>username<\/span> <span>=<\/span> <span>&#8216;brett19&#8217;<\/span><span>;<\/span><br>test.<span>name<\/span> <span>=<\/span> <span>&#8216;Brett Lawson&#8217;<\/span><span>;<\/span><br>test.<span>email<\/span> <span>=<\/span> <span>&#8216;brett19@gmail.com&#8217;<\/span><span>;<\/span>\n<\/p>\n\n\n\n<p>Ottoman.<span>save<\/span><span>(<\/span>test<span>,<\/span> <span>function<\/span><span>(<\/span>err<span>)<\/span> <span>{<\/span><br>\u00a0 <span>if<\/span> <span>(<\/span>err<span>)<\/span> <span>throw<\/span> err<span>;<\/span><br>\u00a0 console.<span>log<\/span><span>(<\/span><span>&#8216;saved&#8217;<\/span><span>)<\/span><span>;<\/span><br><span>}<\/span><span>)<\/span><span>;<\/span><\/p>\n\n\n\n<p>Ottoman additionally allows you to quickly load an object that was previously stored to the database by using findById as well, such as this:<\/p>\n\n\n\n<p>User.<span>findById<\/span><span>(<\/span>test._id<span>,<\/span> <span>function<\/span><span>(<\/span>err<span>,<\/span> obj<span>)<\/span> <span>{<\/span><br>\u00a0 <span>if<\/span> <span>(<\/span>err<span>)<\/span> <span>throw<\/span> err<span>;<\/span>\n<\/p>\n\n\n\n<p>\u00a0 console.<span>log<\/span><span>(<\/span>obj.<span>name<\/span><span>)<\/span><span>;<\/span><br>\u00a0 <span>\/\/ Brett Lawson<\/span><br><span>}<\/span><span>)<\/span><span>;<\/span><\/p>\n\n\n\n<p>So far, we have essentially just looked at some simple load\/store operations that Ottoman can do, lets get a bit deeper than that and see where Ottoman can really help increase our productivity.\u00a0 Lets now say that we are building a blog site, and we need to store a blog post associated to users.\u00a0 Lets build a model to let us do this.<\/p>\n\n\n\n<p><span>var<\/span> BlogPost <span>=<\/span> Ottoman.<span>model<\/span><span>(<\/span><span>&#8216;User&#8217;<\/span><span>,<\/span> <span>{<\/span><br>\u00a0 <span>&#8216;creator&#8217;<\/span><span>:<\/span> <span>&#8216;User&#8217;<\/span><span>,<\/span><br>\u00a0 <span>&#8216;title&#8217;<\/span><span>:<\/span> <span>&#8216;string&#8217;<\/span><span>,<\/span><br>\u00a0 <span>&#8216;content&#8217;<\/span><span>:<\/span> <span>&#8216;string&#8217;<\/span><br><span>}<\/span><span>,<\/span> <span>{<\/span><br>\u00a0 bucket<span>:<\/span> &#8230;<br><span>}<\/span><span>)<\/span><span>;<\/span><\/p>\n\n\n\n<p>You can see here that one of our field types actually refers to our User object created above.\u00a0 This allows us to create a new BlogPost that refers to another document stored in our database.\u00a0 You can also configure a model to be embedded.\u00a0 Lets say we wanted to store the current GPS location of the user, as well as their GPS location when they make a post.\u00a0 We could define a model like this, and use it from User and BlogPost, rather than being a normal referenced document, the data will be directly embedded in their respective objects, but remain as GPSPosition&#8217;s when de-serialized.<\/p>\n\n\n\n<p><span>var<\/span> GPSPosition <span>=<\/span> Ottoman.<span>model<\/span><span>(<\/span><span>&#8216;GPSPosition&#8217;<\/span><span>,<\/span> <span>{<\/span><br>\u00a0 lat<span>:<\/span> <span>&#8216;number&#8217;<\/span><span>,<\/span><br>\u00a0 long<span>:<\/span> <span>&#8216;number&#8217;<\/span><br><span>}<\/span><span>,<\/span> <span>{<\/span><br>\u00a0 embed<span>:<\/span> <span>true<\/span><br><span>}<\/span><span>)<\/span><span>;<\/span><\/p>\n\n\n\n<p>The last interesting feature I would like to mention today is the ability to automatically generate map\/reduce views that allow you to preform basic lookups for our models.\u00a0 I would like to strongly prefix this by saying this feature is very much experimental and only works for some of the most common use cases.\u00a0 Additionally it has the caveat of needing you go manually call `registerDesignDocs` on the Ottoman object after all your models have been registered as this is the only way to determine model linkages, additionally, regenerating these views on every startup of your app would be horribly inefficient, so I usually do it as a sort of `setup phase` at the moment.<\/p>\n\n\n\n<p>To take our blog example even further, lets say we needed a list of our user&#8217;s blog posts.\u00a0 Normally this would involve manually building a view to extract this list by searching all BlogPost&#8217;s on the creator reference for the specific user we are looking for.\u00a0\u00a0 With Ottoman this is much simpler.\u00a0\u00a0 We can simply define a query in the properties for our User object like so:<\/p>\n\n\n\n<p>\u00a0 \u00a0 \u00a0 queries<span>:<\/span> <span>{<\/span><br>\u00a0 \u00a0 \u00a0 \u00a0 myPosts<span>:<\/span> <span>{<\/span><br>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 target<span>:<\/span> <span>&#8216;BlogPost&#8217;<\/span><span>,<\/span><br>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 mappedBy<span>:<\/span> <span>&#8216;creator&#8217;<\/span><span>,<\/span><br>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 sort<span>:<\/span> <span>&#8216;desc&#8217;<\/span><span>,<\/span><br>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 limit<span>:<\/span> <span>5<\/span><br>\u00a0 \u00a0 \u00a0 \u00a0 <span>}<\/span><br>\u00a0 \u00a0 \u00a0 <span>}<\/span><span>,<\/span><\/p>\n\n\n\n<p>Now you can request the posts made by a user simply by invoking the myPosts method on any User instance and you will be returned a list of BlogPost objects that were posted by this user, the location and deserialization of these objects is handled automatically.<\/p>\n\n\n\n<p>There are a ton more features supported by Ottoman that I don&#8217;t have time to show off today, but if you want to see more or want to help out make Ottoman even better, head on over to the GitHub page here: <a href=\"https:\/\/github.com\/couchbaselabs\/node-ottoman\/\">https:\/\/github.com\/couchbaselabs\/node-ottoman\/<\/a> !<\/p>\n\n\n\n<p>Cheers! Brett<\/p>","protected":false},"excerpt":{"rendered":"<p>A few months back, I was talking with some of the users of our Node.js client and heard a fairly standard opinion that people were looking for some method to simplify their life further when using Couchbase from Node.js.\u00a0 One particular things that I heard a lot about was they were looking for some way [&hellip;]<\/p>\n","protected":false},"author":31,"featured_media":18,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1],"tags":[],"ppma_author":[53],"class_list":["post-167","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.6 (Yoast SEO v27.6) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Node.js ODM for Couchbase (Ottoman) - The Couchbase Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.couchbase.com\/blog\/pt\/nodejs-odm-couchbase-ottoman\/\" \/>\n<meta property=\"og:locale\" content=\"pt_BR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Node.js ODM for Couchbase (Ottoman)\" \/>\n<meta property=\"og:description\" content=\"A few months back, I was talking with some of the users of our Node.js client and heard a fairly standard opinion that people were looking for some method to simplify their life further when using Couchbase from Node.js.\u00a0 One particular things that I heard a lot about was they were looking for some way [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/pt\/nodejs-odm-couchbase-ottoman\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2015-07-14T18:03:59+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-nosql-dbaas.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1800\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Brett Lawson, Principal Software Engineer, Couchbase\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Brett Lawson, Principal Software Engineer, Couchbase\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/nodejs-odm-couchbase-ottoman\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/nodejs-odm-couchbase-ottoman\\\/\"},\"author\":{\"name\":\"Brett Lawson, Principal Software Engineer, Couchbase\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/person\\\/5cfc2fbf25776be2a027a474562be02f\"},\"headline\":\"Node.js ODM for Couchbase (Ottoman)\",\"datePublished\":\"2015-07-14T18:03:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/nodejs-odm-couchbase-ottoman\\\/\"},\"wordCount\":923,\"commentCount\":14,\"publisher\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/nodejs-odm-couchbase-ottoman\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/couchbase-nosql-dbaas.png\",\"articleSection\":[\"Uncategorized\"],\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/nodejs-odm-couchbase-ottoman\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/nodejs-odm-couchbase-ottoman\\\/\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/nodejs-odm-couchbase-ottoman\\\/\",\"name\":\"Node.js ODM for Couchbase (Ottoman) - The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/nodejs-odm-couchbase-ottoman\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/nodejs-odm-couchbase-ottoman\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/couchbase-nosql-dbaas.png\",\"datePublished\":\"2015-07-14T18:03:59+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/nodejs-odm-couchbase-ottoman\\\/#breadcrumb\"},\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/nodejs-odm-couchbase-ottoman\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/nodejs-odm-couchbase-ottoman\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/couchbase-nosql-dbaas.png\",\"contentUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/couchbase-nosql-dbaas.png\",\"width\":1800,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/nodejs-odm-couchbase-ottoman\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Node.js ODM for Couchbase (Ottoman)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"pt-BR\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/06\\\/logo.svg\",\"contentUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/06\\\/logo.svg\",\"width\":\"1024\",\"height\":\"1024\",\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/person\\\/5cfc2fbf25776be2a027a474562be02f\",\"name\":\"Brett Lawson, Principal Software Engineer, Couchbase\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6aec1ba24ef7558a248dcde7b7a18b15b06e2885b24b663906a448634066c1c4?s=96&d=mm&r=gee3586f0c112c20e863af447d44dec8f\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6aec1ba24ef7558a248dcde7b7a18b15b06e2885b24b663906a448634066c1c4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6aec1ba24ef7558a248dcde7b7a18b15b06e2885b24b663906a448634066c1c4?s=96&d=mm&r=g\",\"caption\":\"Brett Lawson, Principal Software Engineer, Couchbase\"},\"description\":\"Brett Lawson is a Principal Software Engineer at Couchbase. Brett is responsible for the design and development of the Couchbase Node.js and PHP clients as well as playing a role in the design and development of the C library, libcouchbase.\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/pt\\\/author\\\/brett-lawson\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Node.js ODM for Couchbase (Ottoman) - The Couchbase Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.couchbase.com\/blog\/pt\/nodejs-odm-couchbase-ottoman\/","og_locale":"pt_BR","og_type":"article","og_title":"Node.js ODM for Couchbase (Ottoman)","og_description":"A few months back, I was talking with some of the users of our Node.js client and heard a fairly standard opinion that people were looking for some method to simplify their life further when using Couchbase from Node.js.\u00a0 One particular things that I heard a lot about was they were looking for some way [&hellip;]","og_url":"https:\/\/www.couchbase.com\/blog\/pt\/nodejs-odm-couchbase-ottoman\/","og_site_name":"The Couchbase Blog","article_published_time":"2015-07-14T18:03:59+00:00","og_image":[{"width":1800,"height":630,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-nosql-dbaas.png","type":"image\/png"}],"author":"Brett Lawson, Principal Software Engineer, Couchbase","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Brett Lawson, Principal Software Engineer, Couchbase","Est. reading time":"5 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/nodejs-odm-couchbase-ottoman\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/nodejs-odm-couchbase-ottoman\/"},"author":{"name":"Brett Lawson, Principal Software Engineer, Couchbase","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/5cfc2fbf25776be2a027a474562be02f"},"headline":"Node.js ODM for Couchbase (Ottoman)","datePublished":"2015-07-14T18:03:59+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/nodejs-odm-couchbase-ottoman\/"},"wordCount":923,"commentCount":14,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/nodejs-odm-couchbase-ottoman\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-nosql-dbaas.png","articleSection":["Uncategorized"],"inLanguage":"pt-BR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/nodejs-odm-couchbase-ottoman\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/nodejs-odm-couchbase-ottoman\/","url":"https:\/\/www.couchbase.com\/blog\/nodejs-odm-couchbase-ottoman\/","name":"Node.js ODM for Couchbase (Ottoman) - The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/nodejs-odm-couchbase-ottoman\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/nodejs-odm-couchbase-ottoman\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-nosql-dbaas.png","datePublished":"2015-07-14T18:03:59+00:00","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/nodejs-odm-couchbase-ottoman\/#breadcrumb"},"inLanguage":"pt-BR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/nodejs-odm-couchbase-ottoman\/"]}]},{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/www.couchbase.com\/blog\/nodejs-odm-couchbase-ottoman\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-nosql-dbaas.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-nosql-dbaas.png","width":1800,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/nodejs-odm-couchbase-ottoman\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Node.js ODM for Couchbase (Ottoman)"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"The Couchbase Blog","description":"Couchbase, the NoSQL Database","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"pt-BR"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"The Couchbase Blog","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/06\/logo.svg","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/06\/logo.svg","width":"1024","height":"1024","caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/5cfc2fbf25776be2a027a474562be02f","name":"Brett Lawson, Principal Software Engineer, Couchbase","image":{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/secure.gravatar.com\/avatar\/6aec1ba24ef7558a248dcde7b7a18b15b06e2885b24b663906a448634066c1c4?s=96&d=mm&r=gee3586f0c112c20e863af447d44dec8f","url":"https:\/\/secure.gravatar.com\/avatar\/6aec1ba24ef7558a248dcde7b7a18b15b06e2885b24b663906a448634066c1c4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6aec1ba24ef7558a248dcde7b7a18b15b06e2885b24b663906a448634066c1c4?s=96&d=mm&r=g","caption":"Brett Lawson, Principal Software Engineer, Couchbase"},"description":"Brett Lawson is a Principal Software Engineer at Couchbase. Brett is responsible for the design and development of the Couchbase Node.js and PHP clients as well as playing a role in the design and development of the C library, libcouchbase.","url":"https:\/\/www.couchbase.com\/blog\/pt\/author\/brett-lawson\/"}]}},"acf":[],"authors":[{"term_id":53,"user_id":31,"is_guest":0,"slug":"brett-lawson","display_name":"Brett Lawson, Principal Software Engineer, Couchbase","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","0":null,"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":""}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/posts\/167","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/users\/31"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/comments?post=167"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/posts\/167\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/media\/18"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/media?parent=167"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/categories?post=167"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/tags?post=167"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/ppma_author?post=167"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}