Removing joins from DMP <-> EntityDoiEntity
This commit is contained in:
parent
a235eb98f4
commit
07ff58fbd9
|
@ -54,8 +54,7 @@ public class EntityDoiEntity {
|
|||
|
||||
public static final String _isActive = "isActive";
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "entity_id", nullable = false)
|
||||
@Column(name = "entity_id", columnDefinition = "BINARY(16)")
|
||||
private UUID entityId;
|
||||
|
||||
public static final String _entityId = "entityId";
|
||||
|
|
|
@ -183,7 +183,8 @@ public class DMP implements DataEntity<DMP, UUID> {
|
|||
@Convert(converter = DateToUTCConverter.class)
|
||||
private Date publishedAt;
|
||||
|
||||
@OneToMany(mappedBy = "entityId", fetch = FetchType.LAZY)
|
||||
// @OneToMany(mappedBy = "entityId", fetch = FetchType.LAZY)
|
||||
@Transient
|
||||
private Set<EntityDoiEntity> dois;
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
|
@ -341,6 +342,7 @@ public class DMP implements DataEntity<DMP, UUID> {
|
|||
this.publishedAt = publishedAt;
|
||||
}
|
||||
|
||||
//TODO: Dois will no longer be fetched by hibernate but using the query builders eventually. Use builder where this is called.
|
||||
public Set<EntityDoiEntity> getDois() {
|
||||
return dois;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue