fix(web): 优化外键关联
This commit is contained in:
@@ -46,15 +46,15 @@ public class DataResource extends SimpleEntity {
|
|||||||
@Column(nullable = false)
|
@Column(nullable = false)
|
||||||
private String name;
|
private String name;
|
||||||
private String description;
|
private String description;
|
||||||
@OneToOne(cascade = CascadeType.DETACH, fetch = FetchType.LAZY)
|
@OneToOne(cascade = CascadeType.REMOVE, fetch = FetchType.LAZY)
|
||||||
@JoinColumn(nullable = false)
|
@JoinColumn(nullable = false, foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT))
|
||||||
@ToString.Exclude
|
@ToString.Exclude
|
||||||
private ResourceType type;
|
private ResourceType type;
|
||||||
@OneToOne(cascade = CascadeType.DETACH, fetch = FetchType.LAZY)
|
@OneToOne(cascade = CascadeType.REMOVE, fetch = FetchType.LAZY)
|
||||||
@JoinColumn(nullable = false)
|
@JoinColumn(nullable = false, foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT))
|
||||||
@ToString.Exclude
|
@ToString.Exclude
|
||||||
private ResourceFormat format;
|
private ResourceFormat format;
|
||||||
@OneToOne(cascade = CascadeType.DETACH, fetch = FetchType.LAZY)
|
@OneToOne(fetch = FetchType.LAZY)
|
||||||
@JoinColumn(foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT))
|
@JoinColumn(foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT))
|
||||||
@ToString.Exclude
|
@ToString.Exclude
|
||||||
private DataFile example;
|
private DataFile example;
|
||||||
|
|||||||
Reference in New Issue
Block a user