djangoã§ããããªãªã¹ãã®prefetch djangoã§ããããªãªã¹ãã®prefetchãã§ããªãã¨æã£ããæ®éã«åºæ¥ãã®ã§ããã¨ã³ã£ããããã®ã§è¨äºã«ãã¦ã¿ãã ããããªãªã¹ã? ããã§ã®ããããªãªã¹ãã¨è¨ãã®ã¯ä»¥ä¸ã®ãããªãªã¹ããæãã¦ããã xs = [A(), B(), A(), A(), B(), C()] ã¤ã¾ãã¨ããï¼ã¤ã®åã®ãªãã¸ã§ã¯ãã®ãªã¹ãã§ã¯ãªãè¤æ°ã®åãæ··å¨ãããªã¹ãã®ãããªãã®ãæãã¦ããããã®ãããªãªã¹ãã¯è¤æ°ã®ãã¨ãªãã¢ã¤ãã ãè¦ç´ ã¨ãã¦æã¤ã¿ã¤ã ã©ã¤ã³ã®ãããªãã¼ã¸ãä½ããã¨ããæã«å¿
è¦ã«ãªããä¾ãã°ããã®ãããªãã®ãgeneric foreignkeyã使ã£ã¦ä»¥ä¸ã®æ§ã«å®è£
ããã¨ãããã¨ããããããããªãã from django.contrib.contenttypes.fields import GenericForeignKey from dj
{{#tags}}- {{label}}
{{/tags}}