ActiveRecord4ã§ãããªSQLã¯ã¨ãªã©ãæ¸ãã®ï¼ Mergeç·¨ ã§ã¯ãé¢é£å ã®scopeã使ããã¨ãã§ããmergeãç´¹ä»ãã¾ãããmergeã使ãäºã§ãå¤æ´ã«å¼·ãã¯ã¨ãªãç¾ããçµã¿ç«ã¦ããã¨ãã§ãã¾ããã ä»åã¯ãActiveRecord4ã§æ¸ãã«ããSQLã¯ã¨ãªãã¡ãç´¹ä»ãã¾ãã æ¸ãã«ããã¯ã¨ãªã¨ã¯ãå ·ä½çã«ã¯ä»¥ä¸ã®ãã®ãããããã¾ãã æ¯è¼æ¼ç®ORlikeleft outer joinunionãµãã¯ã¨ãªexists ActiveRecordã§ãããã®ã¯ã¨ãªãçµã¿ç«ã¦ãå ´åãã©ããã¦ãç¾ãããªãï¼SQLæååãã¹ã£ããæ¸ãã¦ãã¾ããããªï¼æ¸ãæ¹ã¨ãªã£ã¦ãã¾ããã¡ã§ãã ãã®å¦çãç¾ããæ¸ãããã«ã¯ãActiveRecordã ãã®æ©è½ã§ã¯è¶³ãããActiveRecordãå é¨ã§ä½¿ã£ã¦ããArelã¨ããã©ã¤ãã©ãªã使ãå¿ è¦ãã§ã¦ãã¾ãã ä»åã¯ãArelã使ã£ã¦è¯éºã«SQLã¯
{{#tags}}- {{label}}
{{/tags}}