changed fetch strategies for queries to improve performance on some queries

This commit is contained in:
annabakouli 2017-12-11 13:05:30 +02:00
parent 0f90e6f56d
commit e069a14b55
5 changed files with 7 additions and 6 deletions

View File

@ -47,13 +47,13 @@ public class DatasetProfile implements Serializable {
private Set<Dataset> dataset;
@OneToOne(fetch = FetchType.EAGER)
@OneToOne(fetch = FetchType.LAZY)
// @Cascade(value=org.hibernate.annotations.CascadeType.ALL)
@JoinColumn(name = "\"Ruleset\"", nullable = true)
private DatasetProfileRuleset ruleset;
@OneToOne(fetch = FetchType.EAGER)
@OneToOne(fetch = FetchType.LAZY)
// @Cascade(value=org.hibernate.annotations.CascadeType.ALL)
@JoinColumn(name = "\"Viewstyle\"", nullable = true)
private DatasetProfileViewstyle viewstyle;

View File

@ -106,7 +106,7 @@ public class Dataset implements DataModel<entities.Dataset>{
this.label = entity.getLabel();
this.properties = entity.getProperties();
this.reference = entity.getReference();
this.dmp = entity.getDmp();
//this.dmp = entity.getDmp();
this.description = entity.getDescription();
this.profile = entity.getProfile();
this.registries = new DomainModelConverter<entities.Registry,Registry>().fromDataModel(entity.getRegistries().stream().collect(Collectors.toList()), Registry.class);

View File

@ -100,6 +100,7 @@ public class DatasetProfiles {
try {
List<DatasetProfile> allDatasetProfiles = datasetProfileDao.getAll();
return new ResponseEntity<Object>(SerializerProvider.toJson(allDatasetProfiles), HttpStatus.OK);
}
catch(Exception ex) {

View File

@ -1,5 +1,5 @@
<div [formGroup]="form">
<p-radioButton name="{{field.id}}" [value]="true" label="Yes" formControlName="value"></p-radioButton>
<p-radioButton name="{{field.id}}" value="true" label="Yes" formControlName="value"></p-radioButton>
<br>
<p-radioButton name="{{field.id}}" [value]="false" label="No" formControlName="value"></p-radioButton>
<p-radioButton name="{{field.id}}" value="false" label="No" formControlName="value"></p-radioButton>
</div>

View File

@ -13,6 +13,6 @@ export class PaginationService {
}
public isElementVisible(elementPage: number):boolean {
return elementPage == this.currentPageIndex ; //TODO
return elementPage == this.currentPageIndex ; //TODO
}
}