ä»åã¯ããã¥ã¡ã³ãããã¡ãã£ã¨é¢ãã¦å¥ã®ãã¨ããã¦ã¿ããã¨æãã¾ãã Chapter 2 ã§ç¶æ¿é¢ä¿ãæ°¸ç¶åã§ãããã¨ãããã£ãã®ã§ãããCompositeãã¿ã¼ã³ã§ããããããæ§é ãæ°¸ç¶åãããã©ããªæããªã®ããªã¼ã¨æ°ã«ãªãå§ããã®ã§ããã試ãã¦ã¿ã¾ãããã¶ãã¿è¦æãªãã§ããã©ã ä»å試ããã¨ã®ãã¤ã³ãã ã¨ã³ãã£ãã£ã¯ComponentãCompositeãLeafã ãªã¬ã¼ã·ã§ã³ã·ããã«ã¯åæ¹åã®ManyToOne/OneToManyã使ãã ç¶æ¿ã®ãããã³ã°ã«ã¯Joined Subclass Strategyã使ãã Compositæ§é å ¨ä½ãä¸åº¦æ°¸ç¶åãã¦ããåå¾ãã¦ã¿ãã persistãã«ã¹ã±ã¼ãããããã«cascade=CascadeType.ALLã¤ããï¼ALLã§ãªãã¦PERSISTã§ããããã§ããã©ï¼ã ã¾ããã¨ã³ãã£ãã£ã®å®ç¾©ã親ã辿ããããã«parentãã£ã¼ã«ãã
{{#tags}}- {{label}}
{{/tags}}