主要使用
@NotFound(action=NotFoundAction.IGNORE) 意爲:找不到引用的外鍵數據時忽略
@JoinColumn(nullable = false)
剩餘的標籤都是自己做項目的時候用到的,在此標記一下,以後使用。
爲了以後粘貼方便:
@JsonView({CunOrderList.class, CunProductsDetails.class, OrderTableOrderList.class})
@ManyToOne(fetch = FetchType.LAZY)
@NotFound(action=NotFoundAction.IGNORE)
@JoinColumn(name = “ocean_id”, nullable = false)
@org.hibernate.annotations.ForeignKey(name = “none”)