{"id":755,"date":"2020-01-08T20:25:52","date_gmt":"2020-01-08T20:25:52","guid":{"rendered":"https:\/\/sdf-docs.mansystems.com\/docs\/acr-rules\/performance\/entity-amount-of-reference-set-associations\/"},"modified":"2020-07-08T14:35:30","modified_gmt":"2020-07-08T14:35:30","slug":"referencesetamount","status":"publish","type":"docs","link":"https:\/\/sdf-docs.clevr.com\/?docs=acr-rules\/performance\/referencesetamount","title":{"rendered":"Entity should have a maximum of N reference set associations"},"content":{"rendered":"\n<p style=\"text-align:center\">Introduced in version: 1.3 (29 Jan 2020)<\/p>\n\n\n\n<p>Reference set associations are always retrieved when retrieving the parent object. This can be bad for performance especially if there are a lot of referred objects. Note that this only applies to persisted entities, for non-persisted entities this data is stored in memory and does not need to be retrieved from the database.<\/p>\n\n\n\n<p>It is possible to configure the maximum number of allowed reference set associations. If set to 0 all reference set associations will be considered violations.<\/p>\n\n\n\n<p><strong>Noncompliant example:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"346\" src=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2020\/01\/image-56-1024x346.png\" alt=\"\" class=\"wp-image-995\" srcset=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2020\/01\/image-56-980x331.png 980w, https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2020\/01\/image-56-480x162.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n","protected":false},"featured_media":0,"parent":95,"menu_order":15,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-755","docs","type-docs","status-publish","hentry"],"comment_count":0,"_links":{"self":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/755"}],"collection":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=755"}],"version-history":[{"count":6,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/755\/revisions"}],"predecessor-version":[{"id":1125,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/755\/revisions\/1125"}],"up":[{"embeddable":true,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/95"}],"next":[{"title":"Many-to-many associations should have owner \"Default\"","link":"https:\/\/sdf-docs.clevr.com\/?docs=acr-rules\/performance\/associationownerboth","href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/1236"}],"prev":[{"title":"Entity should have a maximum of N indices","link":"https:\/\/sdf-docs.clevr.com\/?docs=acr-rules\/performance\/indexamount","href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/233"}],"wp:attachment":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=755"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fdoc_tag&post=755"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}