Cascading annotations?

时间:2017-04-10 00:10:30

标签: java java-ee java-ee-6

hi i needed help for studying for my final exam would hope some can help with it. Cascading does applies to which one of the following annotations?

A.  @OneToOne

B.  @OneToMany

C.  @ManyToMany

D.  @ManyToOne

E.  A, B, C, and D

F.  B, C, and D

1 个答案:

答案 0 :(得分:0)

如果问题是以下哪个注释应用了级联,那么您需要google的内容就是注释本身:

e.g。 ManyToMany。看起来它有一个名为cascade的可选元素。现在OneToOne怎么样? “哦,那是一个宾果游戏。”你已经回答了答案A和C.

因为这只回答了这个问题而你不知道究竟是什么级联,而且它也是关于你的期末考试,我建议你再次阅读你喜欢的关于JPA级联的知识来源。它应该更清楚地说明它与原始数据库的级联有何不同,以及为什么这个答案实际上是有意义的。