{"id":1589,"date":"2023-05-25T23:13:10","date_gmt":"2023-05-25T14:13:10","guid":{"rendered":"https:\/\/blog.fourthgate.jp\/?p=1589"},"modified":"2023-06-14T20:53:23","modified_gmt":"2023-06-14T11:53:23","slug":"cakephp4%e3%81%a7hasmany%e3%81%95%e3%82%8c%e3%81%9f%e3%83%ac%e3%82%b3%e3%83%bc%e3%83%89%e3%81%ae%e3%82%ab%e3%82%a6%e3%83%b3%e3%83%88","status":"publish","type":"post","link":"https:\/\/blog.fourthgate.jp\/?p=1589","title":{"rendered":"CakePHP4\u3067HasMany\u3055\u308c\u305f\u30ec\u30b3\u30fc\u30c9\u306e\u30ab\u30a6\u30f3\u30c8"},"content":{"rendered":"<p>\u50d5\u306f\u300c\u535a\u591a\u5f01\u3067\u3044\u3053\u3046\uff01\u300d\u3068\u3044\u3046\u30b5\u30a4\u30c8\u3092\u904b\u7528\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n\u3053\u306e\u30b5\u30a4\u30c8\u306f\u3001\u3082\u304625\u5e74\u304f\u3089\u3044\u524d\u306bPerl\u306ecgi\u3067\u4f5c\u3063\u305f\u306e\u304c\u6700\u521d\u3067\u3001\u305d\u306e\u5f8c\u3001PHP\u3078\u79fb\u690d\u3002<br \/>\n\u3055\u3089\u306b\u3001CakePHP3\u5316\u3057\u3001\u73fe\u5728\u306fCakePHP4\u3067\u904b\u7528\u3057\u3066\u3044\u307e\u3059\u3002CakePHP\u5316\u3057\u305f\u306e\u306f\u3001\u52c9\u5f37\u306e\u305f\u3081\u3068\u3044\u3046\u610f\u5473\u5408\u3044\u304c\u5f37\u3044\u306e\u3067\u3059\u304c\u3002<\/p>\n<p>\u3053\u306e\u30b5\u30a4\u30c8\u306b\u306f\u3001\u63b2\u8f09\u3057\u3066\u3044\u308b\u8a00\u8449\uff08\u535a\u591a\u5f01\uff09\u3092\u4f7f\u3063\u3066\u3044\u305f\u304b\u3069\u3046\u304b\u306e\u30a2\u30f3\u30b1\u30fc\u30c8\u304c\u3042\u308a\u307e\u3059\u3002\u30a2\u30f3\u30b1\u30fc\u30c8\u306e\u5185\u5bb9\u306f\u3001\u4f7f\u3063\u3066\u3044\u305f\u304b\u3069\u3046\u304b\u306e\u9078\u629e\u3068\u3001\u56de\u7b54\u8005\u306e\u751f\u5e74\u3068\u6027\u5225\u3001\u305d\u308c\u3068\u30d5\u30ea\u30fc\u306e\u30b3\u30e1\u30f3\u30c8\u304b\u3089\u306a\u308a\u307e\u3059\u3002<br \/>\n\u5404\u8a00\u8449\u306f\u30c6\u30fc\u30d6\u30eb\uff08words\uff09\u306b\u3001\u30a2\u30f3\u30b1\u30fc\u30c8\u7d50\u679c\u306f\u30c6\u30fc\u30d6\u30eb\uff08votes\uff09\u306b\u4fdd\u5b58\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n\u30c6\u30fc\u30d6\u30eb\uff08words\uff09\u306f\u3001\u30c6\u30fc\u30d6\u30eb\uff08votes\uff09\u3092HasMany\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u6295\u7968\u7d50\u679c\u306e\u30da\u30fc\u30b8\u3067\u306f\u3001\u4f7f\u3063\u3066\u3044\u305f\u304b\u3069\u3046\u304b\u306e\u56de\u7b54\u306b\u3064\u3044\u3066\u3001\u56de\u7b54\u8005\u306e\u751f\u5e74\u304b\u3089\u7b97\u51fa\u3057\u305f\u5e74\u4ee3\u3068\u6027\u5225\u3067\u30b0\u30eb\u30fc\u30d7\u5206\u3051\u3057\u3066\u3001\u305d\u308c\u305e\u308c\u306e\u4eba\u6570\u3092\u8868\u793a\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n<a href=\"https:\/\/sunnyday-aki.ssl-lolipop.jp\/hakataben\/votes\/result\" target=\"_blank\" rel=\"noopener\">https:\/\/sunnyday-aki.ssl-lolipop.jp\/hakataben\/votes\/result<\/a><\/p>\n<p>\u305d\u308c\u305e\u308c\u306e\u8a00\u8449\u306e\u6295\u7968\u7d50\u679c\u3092\u4e00\u6c17\u306b\u53d6\u5f97\u3059\u308b\u305f\u3081\u306b\u3001case\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u4f7f\u7528\u3057\u307e\u3057\u305f\u3002<br \/>\n\u4e16\u4ee3\u7d5e\u308a\u8fbc\u307f\u306ecase\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u611f\u3058\u3067\u3059\u3002<br \/>\n\u30ab\u30e9\u30e0yesno\u306f\u30011\u3067\u4f7f\u3063\u3066\u3044\u305f\u30020\u306f\u4f7f\u3063\u3066\u3044\u306a\u304b\u3063\u305f\u3002<br \/>\nbirthyear\u306f\u751f\u5e74\u3002\u897f\u66a6\u306e\u6570\u5024\u3067\u3059\u3002sex\u306f\u6027\u5225\u3002<\/p>\n<pre>$q1 = $query-&gt;newExpr()-&gt;case()\n    -&gt;when( $query-&gt;newExpr()-&gt;add( [\n        'yesno' =&gt; 1,\n        $query-&gt;newExpr()-&gt;between('birthyear', '40\u624d\u306e\u751f\u5e74', '21\u624d\u306e\u751f\u5e74' ),\n    ] ) )\n    -&gt;then( 1 )-&gt;else(0);\n<\/pre>\n<p>\u4e0a\u8a18\u306f\u300121\u301c40\u624d\u3067\u4f7f\u3063\u3066\u3044\u305f\u4eba\u3092\u7d5e\u308a\u8fbc\u3080case\u3002<\/p>\n<pre>$q2 = $query-&gt;newExpr()-&gt;case()\n    -&gt;when( $query-&gt;newExpr()-&gt;add( [\n        'yesno' =&gt; 0,\n        'sex' =&gt; 1,\n        $query-&gt;newExpr()-&gt;between('birthyear', '60\u624d\u306e\u751f\u5e74', '41\u624d\u306e\u751f\u5e74' ),\n    ] ) )\n    -&gt;then( 1 )-&gt;else(0);\n<\/pre>\n<p>\u4e0a\u8a18\u306f\u300141\u301c60\u624d\u306e\u7537\u6027\u3067\u4f7f\u3063\u3066\u3044\u306a\u304b\u3063\u305f\u4eba\u3092\u7d5e\u308a\u8fbc\u3080case\u3002<br \/>\nwhen\u306e\u6761\u4ef6\u306b\u30de\u30c3\u30c1\u3059\u308b\u30681\u304c\u3001\u30de\u30c3\u30c1\u3057\u306a\u3051\u308c\u30700\u304c\u8fd4\u3063\u3066\u304d\u307e\u3059\u3002<br \/>\n\u3053\u308c\u3089\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306bsum\u3067\u96c6\u8a08\u3059\u308c\u3070\u3001\u305d\u308c\u305e\u308c\u306e\u8a00\u8449\u306e\u4e16\u4ee3\u5225\u3001\u56de\u7b54\u5225\u306e\u4eba\u6570\u3092\u7b97\u51fa\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre>$query-&gt;select([\n     'age20_yes' =&gt; $query-&gt;func()-&gt;sum($q1),\n     'age60_m_no' =&gt; $query-&gt;func()-&gt;sum($q2),\n ]);<\/pre>\n<p>\u5b9f\u969b\u306b\u751f\u6210\u3055\u308c\u305fSQL\u6587\u3092debug.kit\u3067\u78ba\u8a8d\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre>SUM(\n  CASE WHEN (\n    yesno = 0 \n    AND sex = 1 \n    AND birthyear BETWEEN 1983 \n    AND 2002\n  ) THEN 1 ELSE 0 END\n)\n<\/pre>\n<p>\u203b\u73fe\u5728\u3001\u7d76\u8cdb\u304a\u4ed5\u4e8b\u52df\u96c6\u4e2d\u3067\u3059\u3002\u8208\u5473\u3092\u304a\u6301\u3061\u306e\u304b\u305f\u306f\u3001\u4ee5\u4e0b\u306e\u554f\u3044\u5408\u308f\u305b\u30d5\u30a9\u30fc\u30e0\u304b\u3089<br \/>\n<a href=\"https:\/\/www.fourthgate.jp\/index.php\/contact\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.fourthgate.jp\/index.php\/contact\/<\/a><br \/>\n\u304b\u3089\u3001\u662f\u975e\u662f\u975e\u3054\u9023\u7d61\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u50d5\u306f\u300c\u535a\u591a\u5f01\u3067\u3044\u3053\u3046\uff01\u300d\u3068\u3044\u3046\u30b5\u30a4\u30c8\u3092\u904b\u7528\u3057\u3066\u3044\u307e\u3059\u3002 \u3053\u306e\u30b5\u30a4\u30c8\u306f\u3001\u3082\u304625\u5e74\u304f\u3089\u3044\u524d\u306bPerl\u306ecgi\u3067\u4f5c\u3063\u305f\u306e\u304c\u6700\u521d\u3067\u3001\u305d\u306e\u5f8c\u3001PHP\u3078\u79fb\u690d\u3002 \u3055\u3089\u306b\u3001CakePHP3\u5316\u3057\u3001\u73fe\u5728\u306fCakePHP4\u3067\u904b\u7528\u3057\u3066\u3044\u307e\u3059\u3002 &hellip; <a href=\"https:\/\/blog.fourthgate.jp\/?p=1589\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"footnotes":""},"categories":[5],"tags":[],"class_list":["post-1589","post","type-post","status-publish","format-standard","hentry","category-web"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u50d5\u306f\u300c\u535a\u591a\u5f01\u3067\u3044\u3053\u3046\uff01\u300d\u3068\u3044\u3046\u30b5\u30a4\u30c8\u3092\u904b\u7528\u3057\u3066\u3044\u307e\u3059\u3002 \u3053\u306e\u30b5\u30a4\u30c8\u306f\u3001\u3082\u304625\u5e74\u304f\u3089\u3044\u524d\u306bPerl\u306ecgi\u3067\u4f5c\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"t.akiyama\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/blog.fourthgate.jp\/?p=1589\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"ja_JP\" \/>\n\t\t<meta property=\"og:site_name\" content=\"\u58c1\u306b\u5411\u304b\u3063\u3066.... -\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"CakePHP4\u3067HasMany\u3055\u308c\u305f\u30ec\u30b3\u30fc\u30c9\u306e\u30ab\u30a6\u30f3\u30c8 - \u58c1\u306b\u5411\u304b\u3063\u3066....\" \/>\n\t\t<meta property=\"og:description\" content=\"\u50d5\u306f\u300c\u535a\u591a\u5f01\u3067\u3044\u3053\u3046\uff01\u300d\u3068\u3044\u3046\u30b5\u30a4\u30c8\u3092\u904b\u7528\u3057\u3066\u3044\u307e\u3059\u3002 \u3053\u306e\u30b5\u30a4\u30c8\u306f\u3001\u3082\u304625\u5e74\u304f\u3089\u3044\u524d\u306bPerl\u306ecgi\u3067\u4f5c\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/blog.fourthgate.jp\/?p=1589\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2023-05-25T14:13:10+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2023-06-14T11:53:23+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"CakePHP4\u3067HasMany\u3055\u308c\u305f\u30ec\u30b3\u30fc\u30c9\u306e\u30ab\u30a6\u30f3\u30c8 - \u58c1\u306b\u5411\u304b\u3063\u3066....\" \/>\n\t\t<meta name=\"twitter:description\" content=\"\u50d5\u306f\u300c\u535a\u591a\u5f01\u3067\u3044\u3053\u3046\uff01\u300d\u3068\u3044\u3046\u30b5\u30a4\u30c8\u3092\u904b\u7528\u3057\u3066\u3044\u307e\u3059\u3002 \u3053\u306e\u30b5\u30a4\u30c8\u306f\u3001\u3082\u304625\u5e74\u304f\u3089\u3044\u524d\u306bPerl\u306ecgi\u3067\u4f5c\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/blog.fourthgate.jp\\\/?p=1589#blogposting\",\"name\":\"CakePHP4\\u3067HasMany\\u3055\\u308c\\u305f\\u30ec\\u30b3\\u30fc\\u30c9\\u306e\\u30ab\\u30a6\\u30f3\\u30c8 - \\u58c1\\u306b\\u5411\\u304b\\u3063\\u3066....\",\"headline\":\"CakePHP4\\u3067HasMany\\u3055\\u308c\\u305f\\u30ec\\u30b3\\u30fc\\u30c9\\u306e\\u30ab\\u30a6\\u30f3\\u30c8\",\"author\":{\"@id\":\"https:\\\/\\\/blog.fourthgate.jp\\\/?author=1#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/blog.fourthgate.jp\\\/#organization\"},\"datePublished\":\"2023-05-25T23:13:10+09:00\",\"dateModified\":\"2023-06-14T20:53:23+09:00\",\"inLanguage\":\"ja\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/blog.fourthgate.jp\\\/?p=1589#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/blog.fourthgate.jp\\\/?p=1589#webpage\"},\"articleSection\":\"Web\\u30b3\\u30f3\\u30c6\\u30f3\\u30c4\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/blog.fourthgate.jp\\\/?p=1589#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.fourthgate.jp#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/blog.fourthgate.jp\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.fourthgate.jp\\\/?cat=5#listItem\",\"name\":\"Web\\u30b3\\u30f3\\u30c6\\u30f3\\u30c4\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.fourthgate.jp\\\/?cat=5#listItem\",\"position\":2,\"name\":\"Web\\u30b3\\u30f3\\u30c6\\u30f3\\u30c4\",\"item\":\"https:\\\/\\\/blog.fourthgate.jp\\\/?cat=5\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.fourthgate.jp\\\/?p=1589#listItem\",\"name\":\"CakePHP4\\u3067HasMany\\u3055\\u308c\\u305f\\u30ec\\u30b3\\u30fc\\u30c9\\u306e\\u30ab\\u30a6\\u30f3\\u30c8\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.fourthgate.jp#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.fourthgate.jp\\\/?p=1589#listItem\",\"position\":3,\"name\":\"CakePHP4\\u3067HasMany\\u3055\\u308c\\u305f\\u30ec\\u30b3\\u30fc\\u30c9\\u306e\\u30ab\\u30a6\\u30f3\\u30c8\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.fourthgate.jp\\\/?cat=5#listItem\",\"name\":\"Web\\u30b3\\u30f3\\u30c6\\u30f3\\u30c4\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/blog.fourthgate.jp\\\/#organization\",\"name\":\"\\u58c1\\u306b\\u5411\\u304b\\u3063\\u3066....\",\"url\":\"https:\\\/\\\/blog.fourthgate.jp\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/blog.fourthgate.jp\\\/?author=1#author\",\"url\":\"https:\\\/\\\/blog.fourthgate.jp\\\/?author=1\",\"name\":\"t.akiyama\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/blog.fourthgate.jp\\\/?p=1589#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d726b47f97b556c30875ce264422fbf9e624207333b4fbdeb3f0dda408f56261?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"t.akiyama\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/blog.fourthgate.jp\\\/?p=1589#webpage\",\"url\":\"https:\\\/\\\/blog.fourthgate.jp\\\/?p=1589\",\"name\":\"CakePHP4\\u3067HasMany\\u3055\\u308c\\u305f\\u30ec\\u30b3\\u30fc\\u30c9\\u306e\\u30ab\\u30a6\\u30f3\\u30c8 - \\u58c1\\u306b\\u5411\\u304b\\u3063\\u3066....\",\"description\":\"\\u50d5\\u306f\\u300c\\u535a\\u591a\\u5f01\\u3067\\u3044\\u3053\\u3046\\uff01\\u300d\\u3068\\u3044\\u3046\\u30b5\\u30a4\\u30c8\\u3092\\u904b\\u7528\\u3057\\u3066\\u3044\\u307e\\u3059\\u3002 \\u3053\\u306e\\u30b5\\u30a4\\u30c8\\u306f\\u3001\\u3082\\u304625\\u5e74\\u304f\\u3089\\u3044\\u524d\\u306bPerl\\u306ecgi\\u3067\\u4f5c\",\"inLanguage\":\"ja\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blog.fourthgate.jp\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/blog.fourthgate.jp\\\/?p=1589#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/blog.fourthgate.jp\\\/?author=1#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/blog.fourthgate.jp\\\/?author=1#author\"},\"datePublished\":\"2023-05-25T23:13:10+09:00\",\"dateModified\":\"2023-06-14T20:53:23+09:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/blog.fourthgate.jp\\\/#website\",\"url\":\"https:\\\/\\\/blog.fourthgate.jp\\\/\",\"name\":\"\\u58c1\\u306b\\u5411\\u304b\\u3063\\u3066....\",\"inLanguage\":\"ja\",\"publisher\":{\"@id\":\"https:\\\/\\\/blog.fourthgate.jp\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"CakePHP4\u3067HasMany\u3055\u308c\u305f\u30ec\u30b3\u30fc\u30c9\u306e\u30ab\u30a6\u30f3\u30c8 - \u58c1\u306b\u5411\u304b\u3063\u3066....","description":"\u50d5\u306f\u300c\u535a\u591a\u5f01\u3067\u3044\u3053\u3046\uff01\u300d\u3068\u3044\u3046\u30b5\u30a4\u30c8\u3092\u904b\u7528\u3057\u3066\u3044\u307e\u3059\u3002 \u3053\u306e\u30b5\u30a4\u30c8\u306f\u3001\u3082\u304625\u5e74\u304f\u3089\u3044\u524d\u306bPerl\u306ecgi\u3067\u4f5c","canonical_url":"https:\/\/blog.fourthgate.jp\/?p=1589","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/blog.fourthgate.jp\/?p=1589#blogposting","name":"CakePHP4\u3067HasMany\u3055\u308c\u305f\u30ec\u30b3\u30fc\u30c9\u306e\u30ab\u30a6\u30f3\u30c8 - \u58c1\u306b\u5411\u304b\u3063\u3066....","headline":"CakePHP4\u3067HasMany\u3055\u308c\u305f\u30ec\u30b3\u30fc\u30c9\u306e\u30ab\u30a6\u30f3\u30c8","author":{"@id":"https:\/\/blog.fourthgate.jp\/?author=1#author"},"publisher":{"@id":"https:\/\/blog.fourthgate.jp\/#organization"},"datePublished":"2023-05-25T23:13:10+09:00","dateModified":"2023-06-14T20:53:23+09:00","inLanguage":"ja","mainEntityOfPage":{"@id":"https:\/\/blog.fourthgate.jp\/?p=1589#webpage"},"isPartOf":{"@id":"https:\/\/blog.fourthgate.jp\/?p=1589#webpage"},"articleSection":"Web\u30b3\u30f3\u30c6\u30f3\u30c4"},{"@type":"BreadcrumbList","@id":"https:\/\/blog.fourthgate.jp\/?p=1589#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/blog.fourthgate.jp#listItem","position":1,"name":"Home","item":"https:\/\/blog.fourthgate.jp","nextItem":{"@type":"ListItem","@id":"https:\/\/blog.fourthgate.jp\/?cat=5#listItem","name":"Web\u30b3\u30f3\u30c6\u30f3\u30c4"}},{"@type":"ListItem","@id":"https:\/\/blog.fourthgate.jp\/?cat=5#listItem","position":2,"name":"Web\u30b3\u30f3\u30c6\u30f3\u30c4","item":"https:\/\/blog.fourthgate.jp\/?cat=5","nextItem":{"@type":"ListItem","@id":"https:\/\/blog.fourthgate.jp\/?p=1589#listItem","name":"CakePHP4\u3067HasMany\u3055\u308c\u305f\u30ec\u30b3\u30fc\u30c9\u306e\u30ab\u30a6\u30f3\u30c8"},"previousItem":{"@type":"ListItem","@id":"https:\/\/blog.fourthgate.jp#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/blog.fourthgate.jp\/?p=1589#listItem","position":3,"name":"CakePHP4\u3067HasMany\u3055\u308c\u305f\u30ec\u30b3\u30fc\u30c9\u306e\u30ab\u30a6\u30f3\u30c8","previousItem":{"@type":"ListItem","@id":"https:\/\/blog.fourthgate.jp\/?cat=5#listItem","name":"Web\u30b3\u30f3\u30c6\u30f3\u30c4"}}]},{"@type":"Organization","@id":"https:\/\/blog.fourthgate.jp\/#organization","name":"\u58c1\u306b\u5411\u304b\u3063\u3066....","url":"https:\/\/blog.fourthgate.jp\/"},{"@type":"Person","@id":"https:\/\/blog.fourthgate.jp\/?author=1#author","url":"https:\/\/blog.fourthgate.jp\/?author=1","name":"t.akiyama","image":{"@type":"ImageObject","@id":"https:\/\/blog.fourthgate.jp\/?p=1589#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/d726b47f97b556c30875ce264422fbf9e624207333b4fbdeb3f0dda408f56261?s=96&d=mm&r=g","width":96,"height":96,"caption":"t.akiyama"}},{"@type":"WebPage","@id":"https:\/\/blog.fourthgate.jp\/?p=1589#webpage","url":"https:\/\/blog.fourthgate.jp\/?p=1589","name":"CakePHP4\u3067HasMany\u3055\u308c\u305f\u30ec\u30b3\u30fc\u30c9\u306e\u30ab\u30a6\u30f3\u30c8 - \u58c1\u306b\u5411\u304b\u3063\u3066....","description":"\u50d5\u306f\u300c\u535a\u591a\u5f01\u3067\u3044\u3053\u3046\uff01\u300d\u3068\u3044\u3046\u30b5\u30a4\u30c8\u3092\u904b\u7528\u3057\u3066\u3044\u307e\u3059\u3002 \u3053\u306e\u30b5\u30a4\u30c8\u306f\u3001\u3082\u304625\u5e74\u304f\u3089\u3044\u524d\u306bPerl\u306ecgi\u3067\u4f5c","inLanguage":"ja","isPartOf":{"@id":"https:\/\/blog.fourthgate.jp\/#website"},"breadcrumb":{"@id":"https:\/\/blog.fourthgate.jp\/?p=1589#breadcrumblist"},"author":{"@id":"https:\/\/blog.fourthgate.jp\/?author=1#author"},"creator":{"@id":"https:\/\/blog.fourthgate.jp\/?author=1#author"},"datePublished":"2023-05-25T23:13:10+09:00","dateModified":"2023-06-14T20:53:23+09:00"},{"@type":"WebSite","@id":"https:\/\/blog.fourthgate.jp\/#website","url":"https:\/\/blog.fourthgate.jp\/","name":"\u58c1\u306b\u5411\u304b\u3063\u3066....","inLanguage":"ja","publisher":{"@id":"https:\/\/blog.fourthgate.jp\/#organization"}}]},"og:locale":"ja_JP","og:site_name":"\u58c1\u306b\u5411\u304b\u3063\u3066.... -","og:type":"article","og:title":"CakePHP4\u3067HasMany\u3055\u308c\u305f\u30ec\u30b3\u30fc\u30c9\u306e\u30ab\u30a6\u30f3\u30c8 - \u58c1\u306b\u5411\u304b\u3063\u3066....","og:description":"\u50d5\u306f\u300c\u535a\u591a\u5f01\u3067\u3044\u3053\u3046\uff01\u300d\u3068\u3044\u3046\u30b5\u30a4\u30c8\u3092\u904b\u7528\u3057\u3066\u3044\u307e\u3059\u3002 \u3053\u306e\u30b5\u30a4\u30c8\u306f\u3001\u3082\u304625\u5e74\u304f\u3089\u3044\u524d\u306bPerl\u306ecgi\u3067\u4f5c","og:url":"https:\/\/blog.fourthgate.jp\/?p=1589","article:published_time":"2023-05-25T14:13:10+00:00","article:modified_time":"2023-06-14T11:53:23+00:00","twitter:card":"summary_large_image","twitter:title":"CakePHP4\u3067HasMany\u3055\u308c\u305f\u30ec\u30b3\u30fc\u30c9\u306e\u30ab\u30a6\u30f3\u30c8 - \u58c1\u306b\u5411\u304b\u3063\u3066....","twitter:description":"\u50d5\u306f\u300c\u535a\u591a\u5f01\u3067\u3044\u3053\u3046\uff01\u300d\u3068\u3044\u3046\u30b5\u30a4\u30c8\u3092\u904b\u7528\u3057\u3066\u3044\u307e\u3059\u3002 \u3053\u306e\u30b5\u30a4\u30c8\u306f\u3001\u3082\u304625\u5e74\u304f\u3089\u3044\u524d\u306bPerl\u306ecgi\u3067\u4f5c"},"aioseo_meta_data":{"post_id":"1589","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","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":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","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":"","isEnabled":true},"graphs":[]},"schema_type":"default","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,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2026-01-27 16:02:58","updated":"2026-01-27 16:02:58","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/blog.fourthgate.jp\" 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:\/\/blog.fourthgate.jp\/?cat=5\" title=\"Web\u30b3\u30f3\u30c6\u30f3\u30c4\">Web\u30b3\u30f3\u30c6\u30f3\u30c4<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tCakePHP4\u3067HasMany\u3055\u308c\u305f\u30ec\u30b3\u30fc\u30c9\u306e\u30ab\u30a6\u30f3\u30c8\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/blog.fourthgate.jp"},{"label":"Web\u30b3\u30f3\u30c6\u30f3\u30c4","link":"https:\/\/blog.fourthgate.jp\/?cat=5"},{"label":"CakePHP4\u3067HasMany\u3055\u308c\u305f\u30ec\u30b3\u30fc\u30c9\u306e\u30ab\u30a6\u30f3\u30c8","link":"https:\/\/blog.fourthgate.jp\/?p=1589"}],"_links":{"self":[{"href":"https:\/\/blog.fourthgate.jp\/index.php?rest_route=\/wp\/v2\/posts\/1589","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.fourthgate.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.fourthgate.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.fourthgate.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.fourthgate.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1589"}],"version-history":[{"count":10,"href":"https:\/\/blog.fourthgate.jp\/index.php?rest_route=\/wp\/v2\/posts\/1589\/revisions"}],"predecessor-version":[{"id":1608,"href":"https:\/\/blog.fourthgate.jp\/index.php?rest_route=\/wp\/v2\/posts\/1589\/revisions\/1608"}],"wp:attachment":[{"href":"https:\/\/blog.fourthgate.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1589"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.fourthgate.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1589"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.fourthgate.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1589"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}