{"id":17109,"date":"2015-02-06T15:07:44","date_gmt":"2015-02-06T09:37:44","guid":{"rendered":"https:\/\/2thenew.today\/blog\/?p=17109"},"modified":"2015-07-24T16:59:56","modified_gmt":"2015-07-24T11:29:56","slug":"significance-of-mappedby-in-grails-domain","status":"publish","type":"post","link":"https:\/\/2thenew.today\/blog\/significance-of-mappedby-in-grails-domain\/","title":{"rendered":"Significance of \u201cmappedBy\u201d in Grails Domain"},"content":{"rendered":"<p>&#8220;mappedBy&#8221; is a static map which is used to determine and change the way two associated domain classes interact with each other.<\/p>\n<p>Let&#8217;s start with the role of &#8220;mappedBy&#8221;\u00a0in one-to-many relationships.<\/p>\n<p>Consider the following Example:-<\/p>\n<p>[code]class Team {<br \/>\n\u2003\u2003\u2003\u2003static hasMany = [members: TeamMember]<br \/>\n}[\/code]<\/p>\n<p>&nbsp;<\/p>\n<p>[code]class TeamMember {<br \/>\n\u2003\u2003\u2003\u2003Team memberOf<br \/>\n\u2003\u2003\u2003\u2003Team captainOf<br \/>\n}[\/code]<\/p>\n<p>The Team domain contains a one-to-many association (members) with TeamMember domain which has multiple properties (memberOf, captainOf) of Team type. This makes the association bi-directional.<\/p>\n<p>Now, <a title=\"Grails App Development \" href=\"https:\/\/2thenew.today\/grails-application-development\">Grails\u00a0won&#8217;t know which<\/a> of the properties (memberOf or captainOf) of TeamMember domain it needs to involve while creating this bi-directional one-to-many association and it will give the following error:<\/p>\n<pre>\"Property [members] in class [class Team] is a bidirectional one-to-many \r\nwith two possible properties on the inverse side. Either name one of the properties on \r\nother side of the relationship [team] or use the 'mappedBy' static to define the property \r\nthat the relationship is mapped with. Example: static mappedBy = [members:'myprop']\"<\/pre>\n<p>To resolve this, we declare &#8220;mappedBy&#8221; on the \u201cone\u201d side of this association:<\/p>\n<p>[code]class Team {<br \/>\n\u2003\u2003\u2003\u2003static hasMany = [members: TeamMember]<br \/>\n\u2003\u2003\u2003\u2003static mappedBy = [members: &#8216;memberOf&#8217;]<br \/>\n}[\/code]<\/p>\n<p>This way Grails would know that <strong>[members]<\/strong> of <strong>Team<\/strong> has a bi-directional one-to-many association with <strong>[memberOf]<\/strong> of <strong>TeamMember<\/strong> and it will infer that <strong>Team<\/strong> is associated with <strong>TeamMember<\/strong> in a one-to-one relationship using the property <strong>[captainOf]<\/strong>.<\/p>\n<hr \/>\n<p>On that note, lets consider the case of many-to-many relationships.<\/p>\n<p>Here&#8217;s an example :-<\/p>\n<p>[code]class User {<br \/>\n\u2003\u2003\u2003\u2003static hasMany = [writtenPosts: Article, subscribedPosts: Article]<br \/>\n}[\/code]<\/p>\n<p>[code]class Article {<br \/>\n\u2003\u2003\u2003\u2003User writer<br \/>\n\u2003\u2003\u2003\u2003static hasMany = [subscribers: User]<br \/>\n\u2003\u2003\u2003\u2003static belongsTo = [User]<br \/>\n}[\/code]<\/p>\n<p>These domains are associated with each other in 2 ways:<\/p>\n<ol>\n<li><strong>[writtenPosts]<\/strong> of <strong>User<\/strong> is associatemany-to-one relationship.d with <strong>[writer]<\/strong> of <strong>Article<\/strong> in a bi-directional<\/li>\n<li><strong>[subscribedPosts]<\/strong> of <strong>User<\/strong> is associated with <strong>[subscribers]<\/strong> of <strong>Article<\/strong> in a many-to-many relationship.<\/li>\n<\/ol>\n<p>With this code, Grails will create 4 tables for these 2 classes:<\/p>\n<pre>1. user(id, version, name)\r\n2. article(id, version, description, writer_id)\r\n3. user_subscribed_posts(user_id, article_id)\r\n4. user_written_posts(user_id, article_id)\r\n<\/pre>\n<p>The 4th table is redundant as the same information would be stored in <strong>[writer_id]<\/strong> column of <strong>article<\/strong> table. To prevent this, we declare \u201cmappedBy\u201d in the <strong>User<\/strong> domain specifying:<\/p>\n<ol>\n<li><strong>[writtenPosts]<\/strong> of <strong>User<\/strong> is associated with <strong>[writer]<\/strong> of <strong>[Article]<\/strong>.<\/li>\n<li><strong>[subscribedPosts]<\/strong> of <strong>User<\/strong> is associated with <strong>[subscribers]<\/strong> of <strong>Article<\/strong>.<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>[code]class User {<br \/>\n\u2003\u2003\u2003\u2003static hasMany = [writtenPosts: Article, subscribedPosts: Article]<br \/>\n\u2003\u2003\u2003\u2003static mappedBy = [writtenPosts: &#8216;writer&#8217;, subscribedPosts: &#8216;subscribers&#8217;]<br \/>\n}[\/code]<\/p>\n<p>Now, when this code runs only 3 tables are created:<\/p>\n<pre>1. user(id, version, name)\r\n2. article(id, version, description, writer_id)\r\n3. user_subscribed_posts(user_id, article_id)\r\n<\/pre>\n<p>By using &#8220;mappedBy&#8221; we can direct Grails towards the correct relationship or change the inferred relationship between multiple domains to suite our needs.<\/p>\n<p>I came by this topic while perusing through <a title=\"Grails Wikipedia\" href=\"https:\/\/en.wikipedia.org\/wiki\/Grails_(framework)\">Grails\u00a0wiki<\/a> and thought of sharing this with everyone.<\/p>\n<p>Hope you enjoyed reading this blog.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;mappedBy&#8221; is a static map which is used to determine and change the way two associated domain classes interact with each other. Let&#8217;s start with the role of &#8220;mappedBy&#8221;\u00a0in one-to-many relationships. Consider the following Example:- [code]class Team { \u2003\u2003\u2003\u2003static hasMany = [members: TeamMember] }[\/code] &nbsp; [code]class TeamMember { \u2003\u2003\u2003\u2003Team memberOf \u2003\u2003\u2003\u2003Team captainOf }[\/code] The Team [&hellip;]<\/p>\n","protected":false},"author":159,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":73,"footnotes":""},"categories":[7],"tags":[4840,1630,1627,1629],"class_list":["post-17109","post","type-post","status-publish","format-standard","hentry","category-grails","tag-grails","tag-many-to-many","tag-mappedby","tag-one-to-many"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"&quot;mappedBy&quot; is a static map which is used to determine and change the way two associated domain classes interact with each other. Let&#039;s start with the role of &quot;mappedBy&quot; in one-to-many relationships. Consider the following Example:- [code]class Team { static hasMany = [members: TeamMember] }[\/code] [code]class TeamMember { Team memberOf Team captainOf }[\/code] The Team\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Naman Gautam\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/2thenew.today\/blog\/significance-of-mappedby-in-grails-domain\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Significance of \u201cmappedBy\u201d in Grails Domain | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"&quot;mappedBy&quot; is a static map which is used to determine and change the way two associated domain classes interact with each other. Let&#039;s start with the role of &quot;mappedBy&quot; in one-to-many relationships. Consider the following Example:- [code]class Team { static hasMany = [members: TeamMember] }[\/code] [code]class TeamMember { Team memberOf Team captainOf }[\/code] The Team\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/2thenew.today\/blog\/significance-of-mappedby-in-grails-domain\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/2thenew.today\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/2thenew.today\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"article:tag\" content=\"grails\" \/>\n\t\t<meta property=\"article:tag\" content=\"many-to-many\" \/>\n\t\t<meta property=\"article:tag\" content=\"mappedby\" \/>\n\t\t<meta property=\"article:tag\" content=\"one-to-many\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2015-02-06T09:37:44+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2015-07-24T11:29:56+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Significance of \u201cmappedBy\u201d in Grails Domain | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"&quot;mappedBy&quot; is a static map which is used to determine and change the way two associated domain classes interact with each other. Let&#039;s start with the role of &quot;mappedBy&quot; in one-to-many relationships. Consider the following Example:- [code]class Team { static hasMany = [members: TeamMember] }[\/code] [code]class TeamMember { Team memberOf Team captainOf }[\/code] The Team\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/2thenew.today\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/significance-of-mappedby-in-grails-domain\\\/#article\",\"name\":\"Significance of \\u201cmappedBy\\u201d in Grails Domain | TO THE NEW Blog\",\"headline\":\"Significance of \\u201cmappedBy\\u201d in Grails Domain\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/naman\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"datePublished\":\"2015-02-06T15:07:44+05:30\",\"dateModified\":\"2015-07-24T16:59:56+05:30\",\"inLanguage\":\"en-US\",\"commentCount\":1,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/significance-of-mappedby-in-grails-domain\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/significance-of-mappedby-in-grails-domain\\\/#webpage\"},\"articleSection\":\"Grails, Grails, Many-to-Many, mappedBy, One-to-Many\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/significance-of-mappedby-in-grails-domain\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/#listItem\",\"name\":\"Grails\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/#listItem\",\"position\":2,\"name\":\"Grails\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/significance-of-mappedby-in-grails-domain\\\/#listItem\",\"name\":\"Significance of \\u201cmappedBy\\u201d in Grails Domain\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/significance-of-mappedby-in-grails-domain\\\/#listItem\",\"position\":3,\"name\":\"Significance of \\u201cmappedBy\\u201d in Grails Domain\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/#listItem\",\"name\":\"Grails\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/naman\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/naman\\\/\",\"name\":\"Naman Gautam\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/significance-of-mappedby-in-grails-domain\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ca37e61968e15d4b3c3b3a4714f5981c636c101b627b527423289d260b0a4b91?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Naman Gautam\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/significance-of-mappedby-in-grails-domain\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/significance-of-mappedby-in-grails-domain\\\/\",\"name\":\"Significance of \\u201cmappedBy\\u201d in Grails Domain | TO THE NEW Blog\",\"description\":\"\\\"mappedBy\\\" is a static map which is used to determine and change the way two associated domain classes interact with each other. Let's start with the role of \\\"mappedBy\\\" in one-to-many relationships. Consider the following Example:- [code]class Team { static hasMany = [members: TeamMember] }[\\\/code] [code]class TeamMember { Team memberOf Team captainOf }[\\\/code] The Team\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/significance-of-mappedby-in-grails-domain\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/naman\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/naman\\\/#author\"},\"datePublished\":\"2015-02-06T15:07:44+05:30\",\"dateModified\":\"2015-07-24T16:59:56+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Significance of \u201cmappedBy\u201d in Grails Domain | TO THE NEW Blog","description":"\"mappedBy\" is a static map which is used to determine and change the way two associated domain classes interact with each other. Let's start with the role of \"mappedBy\" in one-to-many relationships. Consider the following Example:- [code]class Team { static hasMany = [members: TeamMember] }[\/code] [code]class TeamMember { Team memberOf Team captainOf }[\/code] The Team","canonical_url":"https:\/\/2thenew.today\/blog\/significance-of-mappedby-in-grails-domain\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/2thenew.today\/blog\/significance-of-mappedby-in-grails-domain\/#article","name":"Significance of \u201cmappedBy\u201d in Grails Domain | TO THE NEW Blog","headline":"Significance of \u201cmappedBy\u201d in Grails Domain","author":{"@id":"https:\/\/2thenew.today\/blog\/author\/naman\/#author"},"publisher":{"@id":"https:\/\/2thenew.today\/blog\/#organization"},"datePublished":"2015-02-06T15:07:44+05:30","dateModified":"2015-07-24T16:59:56+05:30","inLanguage":"en-US","commentCount":1,"mainEntityOfPage":{"@id":"https:\/\/2thenew.today\/blog\/significance-of-mappedby-in-grails-domain\/#webpage"},"isPartOf":{"@id":"https:\/\/2thenew.today\/blog\/significance-of-mappedby-in-grails-domain\/#webpage"},"articleSection":"Grails, Grails, Many-to-Many, mappedBy, One-to-Many"},{"@type":"BreadcrumbList","@id":"https:\/\/2thenew.today\/blog\/significance-of-mappedby-in-grails-domain\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/2thenew.today\/blog#listItem","position":1,"name":"Home","item":"https:\/\/2thenew.today\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/2thenew.today\/blog\/category\/grails\/#listItem","name":"Grails"}},{"@type":"ListItem","@id":"https:\/\/2thenew.today\/blog\/category\/grails\/#listItem","position":2,"name":"Grails","item":"https:\/\/2thenew.today\/blog\/category\/grails\/","nextItem":{"@type":"ListItem","@id":"https:\/\/2thenew.today\/blog\/significance-of-mappedby-in-grails-domain\/#listItem","name":"Significance of \u201cmappedBy\u201d in Grails Domain"},"previousItem":{"@type":"ListItem","@id":"https:\/\/2thenew.today\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/2thenew.today\/blog\/significance-of-mappedby-in-grails-domain\/#listItem","position":3,"name":"Significance of \u201cmappedBy\u201d in Grails Domain","previousItem":{"@type":"ListItem","@id":"https:\/\/2thenew.today\/blog\/category\/grails\/#listItem","name":"Grails"}}]},{"@type":"Organization","@id":"https:\/\/2thenew.today\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/2thenew.today\/blog\/"},{"@type":"Person","@id":"https:\/\/2thenew.today\/blog\/author\/naman\/#author","url":"https:\/\/2thenew.today\/blog\/author\/naman\/","name":"Naman Gautam","image":{"@type":"ImageObject","@id":"https:\/\/2thenew.today\/blog\/significance-of-mappedby-in-grails-domain\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/ca37e61968e15d4b3c3b3a4714f5981c636c101b627b527423289d260b0a4b91?s=96&d=mm&r=g","width":96,"height":96,"caption":"Naman Gautam"}},{"@type":"WebPage","@id":"https:\/\/2thenew.today\/blog\/significance-of-mappedby-in-grails-domain\/#webpage","url":"https:\/\/2thenew.today\/blog\/significance-of-mappedby-in-grails-domain\/","name":"Significance of \u201cmappedBy\u201d in Grails Domain | TO THE NEW Blog","description":"\"mappedBy\" is a static map which is used to determine and change the way two associated domain classes interact with each other. Let's start with the role of \"mappedBy\" in one-to-many relationships. Consider the following Example:- [code]class Team { static hasMany = [members: TeamMember] }[\/code] [code]class TeamMember { Team memberOf Team captainOf }[\/code] The Team","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/2thenew.today\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/2thenew.today\/blog\/significance-of-mappedby-in-grails-domain\/#breadcrumblist"},"author":{"@id":"https:\/\/2thenew.today\/blog\/author\/naman\/#author"},"creator":{"@id":"https:\/\/2thenew.today\/blog\/author\/naman\/#author"},"datePublished":"2015-02-06T15:07:44+05:30","dateModified":"2015-07-24T16:59:56+05:30"},{"@type":"WebSite","@id":"https:\/\/2thenew.today\/blog\/#website","url":"https:\/\/2thenew.today\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/2thenew.today\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"article","og:title":"Significance of \u201cmappedBy\u201d in Grails Domain | TO THE NEW Blog","og:description":"&quot;mappedBy&quot; is a static map which is used to determine and change the way two associated domain classes interact with each other. Let's start with the role of &quot;mappedBy&quot; in one-to-many relationships. Consider the following Example:- [code]class Team { static hasMany = [members: TeamMember] }[\/code] [code]class TeamMember { Team memberOf Team captainOf }[\/code] The Team","og:url":"https:\/\/2thenew.today\/blog\/significance-of-mappedby-in-grails-domain\/","og:image":"https:\/\/2thenew.today\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/2thenew.today\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","article:tag":{"0":"grails","2":"many-to-many","3":"mappedby","4":"one-to-many"},"article:published_time":"2015-02-06T09:37:44+00:00","article:modified_time":"2015-07-24T11:29:56+00:00","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"Significance of \u201cmappedBy\u201d in Grails Domain | TO THE NEW Blog","twitter:description":"&quot;mappedBy&quot; is a static map which is used to determine and change the way two associated domain classes interact with each other. Let's start with the role of &quot;mappedBy&quot; in one-to-many relationships. Consider the following Example:- [code]class Team { static hasMany = [members: TeamMember] }[\/code] [code]class TeamMember { Team memberOf Team captainOf }[\/code] The Team","twitter:image":"https:\/\/2thenew.today\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"17109","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":"","og_description":"","og_object_type":"article","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":"","og_article_tags":"","twitter_use_og":false,"twitter_card":"summary","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2021-04-29 22:46:51","updated":"2024-02-29 09:33:28","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/2thenew.today\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/2thenew.today\/blog\/category\/grails\/\" title=\"Grails\">Grails<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tSignificance of \u201cmappedBy\u201d in Grails Domain\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/2thenew.today\/blog"},{"label":"Grails","link":"https:\/\/2thenew.today\/blog\/category\/grails\/"},{"label":"Significance of \u201cmappedBy\u201d in Grails Domain","link":"https:\/\/2thenew.today\/blog\/significance-of-mappedby-in-grails-domain\/"}],"_links":{"self":[{"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/posts\/17109","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/users\/159"}],"replies":[{"embeddable":true,"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/comments?post=17109"}],"version-history":[{"count":0,"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/posts\/17109\/revisions"}],"wp:attachment":[{"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/media?parent=17109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/categories?post=17109"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/tags?post=17109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}