{"id":91579,"date":"2017-07-30T11:56:46","date_gmt":"2017-07-30T11:56:46","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=91579"},"modified":"2026-02-27T12:07:32","modified_gmt":"2026-02-27T12:07:32","slug":"database-transactions-magento2","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/database-transactions-magento2\/","title":{"rendered":"Working With Database Transactions In Magento 2"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p>In a structure like Magento 2, it is very difficult to guarantee the consistency of data, the system of EAV(Entity Attribute Value) makes Magento 2 highly scalable and modular but every thing comes with a cost, managing the data in these structures can be very difficult. To ensure the consistency of data, Magento 2 uses database transactions.<\/p>\n\n\n\n<p>Whenever we save a model in Magento, it gets executed as a transaction, when you will dig deeper and check the&nbsp;Magento\\Framework\\Model\\AbstractModel class you will found the save function:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">public function save()\n    {\n        $this-&gt;_getResource()-&gt;save($this);\n        return $this;\n    }<\/pre>\n\n\n\n<p>you can see that the save method is calling another save method from resource class, even the delete method calls the delete method of the resource model class, so resource model is responsible for saving, updating, deleting rows from the database.<\/p>\n\n\n\n<p>Let&#8217;s check the resource model save method when you will check the resource model parent class, you will find this class:<\/p>\n\n\n\n<p>Magento\\Framework\\Model\\ResourceModel\\Db\\AbstractDb and the save method is defined in the class, although you can override the save method in the resource model concrete class, you still need to call the parent class &#8220;save&#8221; method:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">public function save(\\Magento\\Framework\\Model\\AbstractModel $object)\n    {\n        if ($object-&gt;isDeleted()) {\n            return $this-&gt;delete($object);\n        }\n\n        $this-&gt;beginTransaction();\n\n        try {\n            if (!$this-&gt;isModified($object)) {\n                $this-&gt;processNotModifiedSave($object);\n                $this-&gt;commit();\n                $object-&gt;setHasDataChanges(false);\n                return $this;\n            }\n            $object-&gt;validateBeforeSave();\n            $object-&gt;beforeSave();\n            if ($object-&gt;isSaveAllowed()) {\n                $this-&gt;_serializeFields($object);\n                $this-&gt;_beforeSave($object);\n                $this-&gt;_checkUnique($object);\n                $this-&gt;objectRelationProcessor-&gt;validateDataIntegrity($this-&gt;getMainTable(), $object-&gt;getData());\n                if ($this-&gt;isObjectNotNew($object)) {\n                    $this-&gt;updateObject($object);\n                } else {\n                    $this-&gt;saveNewObject($object);\n                }\n                $this-&gt;unserializeFields($object);\n                $this-&gt;processAfterSaves($object);\n            }\n            $this-&gt;addCommitCallback(&#091;$object, &#039;afterCommitCallback&#039;])-&gt;commit();\n            $object-&gt;setHasDataChanges(false);\n        } catch (DuplicateException $e) {\n            $this-&gt;rollBack();\n            $object-&gt;setHasDataChanges(true);\n            throw new AlreadyExistsException(new Phrase(&#039;Unique constraint violation found&#039;), $e);\n        } catch (\\Exception $e) {\n            $this-&gt;rollBack();\n            $object-&gt;setHasDataChanges(true);\n            throw $e;\n        }\n        return $this;\n    }<\/pre>\n\n\n\n<p>The above code is also very abstract, but still pretty much understandable, thanks to great naming sense by the Magento developers. The methods those are related to transactions are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>beginTransaction:<\/strong> this method starts the transaction.<\/li>\n\n\n\n<li><strong>commit:<\/strong> this method commits the transaction, we should only call the commit until and unless it is assured that everything is correct because there is no rolling back after commit.<\/li>\n\n\n\n<li><strong>rollBack:<\/strong> this is used to roll back all the changes in the tables if any exception arises, as you can see it is called in the catch block of exception handling.<\/li>\n<\/ul>\n\n\n\n<p>the above save method could be similar to the raw SQL code:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">START TRANSACTION\n\n\/\/multiple queries can be defined here to save or update the database tables\n\nCOMMIT or ROLLBACK<\/pre>\n\n\n\n<p>That&#8217;s how Magento uses transactions while you save or update any models. you can even create an observer to make some checks before commit and if your check fails just throw an error and every thing will be rolled back.<\/p>\n\n\n\n<p>If you check the function <strong>processAfterSaves:<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">protected function processAfterSaves(\\Magento\\Framework\\Model\\AbstractModel $object)\n    {\n        $this-&gt;_afterSave($object);\n        $object-&gt;afterSave();\n    }<\/pre>\n\n\n\n<p>in the above method, you can see the object&#8217;s(this object can be any model class) afterSave method is called, the afterSave method of model resides in class Magento\\Framework\\Model\\AbstractModel\\<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">public function afterSave()\n    {\n        $this-&gt;cleanModelCache();\n        $this-&gt;_eventManager-&gt;dispatch(&#039;model_save_after&#039;, &#091;&#039;object&#039; =&gt; $this]);\n        $this-&gt;_eventManager-&gt;dispatch(&#039;clean_cache_by_tags&#039;, &#091;&#039;object&#039; =&gt; $this]);\n        $this-&gt;_eventManager-&gt;dispatch($this-&gt;_eventPrefix . &#039;_save_after&#039;, $this-&gt;_getEventData());\n        $this-&gt;updateStoredData();\n        return $this;\n    }<\/pre>\n\n\n\n<p>in the above method you can see there is an event dispatched, with a dynamic string included in the name:<\/p>\n\n\n\n<p><strong>$this-&gt;_eventPrefix&nbsp;<\/strong>this returns the model&#8217;s events prefix name that you define in your model class, in the case of order model it is sales_order, so the after saving event for the order model will be:<\/p>\n\n\n\n<p><strong>sales_order_after_save <\/strong>similarly you can predict any model class after save observer event name. Using this event you can put your code before commit and can easily roll back any incorrect updates.<\/p>\n\n\n\n<p>Hope this will help you in solving your issues. If you have any issues or doubts in the above explanation you can ask in the comments, I will try my best to answer you.<\/p>\n\n\n\n<p>Thanks \ud83d\ude42<\/p>\n\n\n\n<p>You may also check our quality <a href=\"https:\/\/store.webkul.com\/Magento-2.html\" target=\"_blank\" rel=\"noreferrer noopener\">Magento 2 Extensions<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction In a structure like Magento 2, it is very difficult to guarantee the consistency of data, the system of EAV(Entity Attribute Value) makes Magento 2 highly scalable and modular but every thing comes with a cost, managing the data in these structures can be very difficult. To ensure the consistency of data, Magento 2 <a href=\"https:\/\/webkul.com\/blog\/database-transactions-magento2\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":33,"featured_media":73740,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[302,13],"tags":[],"class_list":["post-91579","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-magento2","category-php"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Working With Database Transactions In Magento 2<\/title>\n<meta name=\"description\" content=\"managing the data in these structures are very difficult. To insure the consistency of data, Magento 2 uses database transactions\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/database-transactions-magento2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Working With Database Transactions In Magento 2\" \/>\n<meta property=\"og:description\" content=\"managing the data in these structures are very difficult. To insure the consistency of data, Magento 2 uses database transactions\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/database-transactions-magento2\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2017-07-30T11:56:46+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-27T12:07:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/02\/Magneto-Code-Snippet-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"825\" \/>\n\t<meta property=\"og:image:height\" content=\"260\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Ashutosh Srivastava\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ashutosh Srivastava\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/database-transactions-magento2\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/database-transactions-magento2\/\"},\"author\":{\"name\":\"Ashutosh Srivastava\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/5555025750ec4e4df34fadc78b083970\"},\"headline\":\"Working With Database Transactions In Magento 2\",\"datePublished\":\"2017-07-30T11:56:46+00:00\",\"dateModified\":\"2026-02-27T12:07:32+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/database-transactions-magento2\/\"},\"wordCount\":517,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/database-transactions-magento2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/02\/Magneto-Code-Snippet-1.png\",\"articleSection\":[\"Magento2\",\"php\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/database-transactions-magento2\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/database-transactions-magento2\/\",\"url\":\"https:\/\/webkul.com\/blog\/database-transactions-magento2\/\",\"name\":\"Working With Database Transactions In Magento 2\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/database-transactions-magento2\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/database-transactions-magento2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/02\/Magneto-Code-Snippet-1.png\",\"datePublished\":\"2017-07-30T11:56:46+00:00\",\"dateModified\":\"2026-02-27T12:07:32+00:00\",\"description\":\"managing the data in these structures are very difficult. To insure the consistency of data, Magento 2 uses database transactions\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/database-transactions-magento2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/database-transactions-magento2\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/database-transactions-magento2\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/02\/Magneto-Code-Snippet-1.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/02\/Magneto-Code-Snippet-1.png\",\"width\":825,\"height\":260},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/database-transactions-magento2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Working With Database Transactions In Magento 2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/5555025750ec4e4df34fadc78b083970\",\"name\":\"Ashutosh Srivastava\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/2f5312e6903909ffeb33aa5eb38e1c0bed8f498f92144f5f84065adf7e8708a6?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/2f5312e6903909ffeb33aa5eb38e1c0bed8f498f92144f5f84065adf7e8708a6?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Ashutosh Srivastava\"},\"sameAs\":[\"http:\/\/webkul.com\"],\"url\":\"https:\/\/webkul.com\/blog\/author\/ashutosh\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Working With Database Transactions In Magento 2","description":"managing the data in these structures are very difficult. To insure the consistency of data, Magento 2 uses database transactions","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:\/\/webkul.com\/blog\/database-transactions-magento2\/","og_locale":"en_US","og_type":"article","og_title":"Working With Database Transactions In Magento 2","og_description":"managing the data in these structures are very difficult. To insure the consistency of data, Magento 2 uses database transactions","og_url":"https:\/\/webkul.com\/blog\/database-transactions-magento2\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2017-07-30T11:56:46+00:00","article_modified_time":"2026-02-27T12:07:32+00:00","og_image":[{"width":825,"height":260,"url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/02\/Magneto-Code-Snippet-1.png","type":"image\/png"}],"author":"Ashutosh Srivastava","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Ashutosh Srivastava","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/database-transactions-magento2\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/database-transactions-magento2\/"},"author":{"name":"Ashutosh Srivastava","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/5555025750ec4e4df34fadc78b083970"},"headline":"Working With Database Transactions In Magento 2","datePublished":"2017-07-30T11:56:46+00:00","dateModified":"2026-02-27T12:07:32+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/database-transactions-magento2\/"},"wordCount":517,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/database-transactions-magento2\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/02\/Magneto-Code-Snippet-1.png","articleSection":["Magento2","php"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/database-transactions-magento2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/database-transactions-magento2\/","url":"https:\/\/webkul.com\/blog\/database-transactions-magento2\/","name":"Working With Database Transactions In Magento 2","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/database-transactions-magento2\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/database-transactions-magento2\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/02\/Magneto-Code-Snippet-1.png","datePublished":"2017-07-30T11:56:46+00:00","dateModified":"2026-02-27T12:07:32+00:00","description":"managing the data in these structures are very difficult. To insure the consistency of data, Magento 2 uses database transactions","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/database-transactions-magento2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/database-transactions-magento2\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/database-transactions-magento2\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/02\/Magneto-Code-Snippet-1.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/02\/Magneto-Code-Snippet-1.png","width":825,"height":260},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/database-transactions-magento2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Working With Database Transactions In Magento 2"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/5555025750ec4e4df34fadc78b083970","name":"Ashutosh Srivastava","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/2f5312e6903909ffeb33aa5eb38e1c0bed8f498f92144f5f84065adf7e8708a6?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2f5312e6903909ffeb33aa5eb38e1c0bed8f498f92144f5f84065adf7e8708a6?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Ashutosh Srivastava"},"sameAs":["http:\/\/webkul.com"],"url":"https:\/\/webkul.com\/blog\/author\/ashutosh\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/91579","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/33"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=91579"}],"version-history":[{"count":13,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/91579\/revisions"}],"predecessor-version":[{"id":528627,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/91579\/revisions\/528627"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media\/73740"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=91579"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=91579"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=91579"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}