Which annotation should I use: @IdClass or @EmbeddedId

The `JPA` (Java Persistence API) specification has 2 different ways to specify entity composite keys: `@IdClass` and `@EmbeddedId`. I'm using both annotations on my mapped entities, but it turns out to be a big mess to people who aren't very familiar with `JPA`. I want to adopt only one way to specify composite keys. Which one is really the best? Why?

以上就是Which annotation should I use: @IdClass or @EmbeddedId的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准