2018-11-06-常用的Annotation

2018-11-08  本文已影响0人  LiuYanPin

官方文档

Spring持久化

javax.persistence.*

参数
    Class targetEntity() default void.class;
    CascadeType[] cascade() default {};
    FetchType fetch() default FetchType.LAZY;
    String mappedBy() default "";
    boolean orphanRemoval() default false;
@ElementCollection
@CollectionTable(name = "book",
joinColumns = {@JoinColumn(name = "book_id", referencedColumnName = "id")})
@Column(name = "author_id")
private List<String> bookIds;

lombok

主页

上一篇下一篇

猜你喜欢

热点阅读