-
Notifications
You must be signed in to change notification settings - Fork 1
293011 upgrade maven depedency postgresql from 42.6.0 to 42.7.8
#158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: SandboxEnv
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,7 +6,6 @@ | |
| import javax.persistence.Column; | ||
| import javax.persistence.Entity; | ||
| import javax.persistence.GeneratedValue; | ||
| import javax.persistence.GenerationType; | ||
| import javax.persistence.Id; | ||
| import javax.persistence.JoinColumn; | ||
| import javax.persistence.ManyToOne; | ||
|
|
@@ -16,6 +15,7 @@ | |
|
|
||
| import org.eea.interfaces.vo.dataset.CsvLineAndRecordFieldsHolder; | ||
| import org.eea.interfaces.vo.dataset.enums.ErrorTypeEnum; | ||
| import org.hibernate.annotations.BatchSize; | ||
| import org.hibernate.annotations.GenericGenerator; | ||
| import lombok.Getter; | ||
| import lombok.Setter; | ||
|
|
@@ -28,18 +28,20 @@ | |
| @Getter | ||
| @Setter | ||
| @ToString | ||
| @Table(name = "RECORD_VALUE") | ||
| @Table(name = "record_value") | ||
| public class RecordValue { | ||
|
|
||
|
|
||
| /** | ||
| * The id. | ||
| */ | ||
| @Id | ||
| @GenericGenerator(name = "record_sequence_generator", | ||
| strategy = "org.eea.dataset.persistence.data.sequence.RecordValueIdGenerator") | ||
| @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "record_sequence_generator") | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this should not be removed |
||
| @Column(name = "ID", columnDefinition = "serial") | ||
| @GenericGenerator( | ||
| name = "record_sequence_generator", | ||
| strategy = "org.eea.dataset.persistence.data.sequence.RecordValueIdGenerator" | ||
| ) | ||
| @GeneratedValue(generator = "record_sequence_generator") | ||
| @Column(name = "ID") | ||
| private String id; | ||
|
|
||
| /** | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2577,12 +2577,27 @@ private List<RecordValue> createRecords(Long datasetId, String dataProviderCode, | |
| partitionDataSetMetabaseRepository.findFirstByIdDataSet_idAndUsername(datasetId, USER) | ||
| .orElse(new PartitionDataSetMetabase()).getId(); | ||
|
|
||
| DatasetValue dataset = new DatasetValue(); | ||
| dataset.setId(datasetId); | ||
|
|
||
| TableValue tableValue = new TableValue(); | ||
| tableValue.setId(tableRepository.findIdByIdTableSchema(tableSchemaId)); | ||
| tableValue.setDatasetId(dataset); | ||
| LOG.info("[CHRIS]"); | ||
| // fetch dataset_value here, if null then save it | ||
| DatasetValue datasetValue = datasetRepository.findById(datasetId).orElse(null); | ||
| if (datasetValue == null) { | ||
| datasetValue = new DatasetValue(); | ||
| datasetValue.setId(datasetId); | ||
| datasetValue = datasetRepository.save(datasetValue); | ||
| } | ||
| LOG.info("[CHRIS] DatasetValue: {}", datasetValue); | ||
|
|
||
|
|
||
| String schemaId = tableSchema.getIdTableSchema().toString(); | ||
| // fetch table_value here, if null then save it | ||
| TableValue tableValue = tableRepository.findByIdTableSchema(schemaId); | ||
| if (tableValue == null) { | ||
| tableValue = new TableValue(); | ||
| tableValue.setDatasetId(datasetValue); | ||
| tableValue.setIdTableSchema(schemaId); | ||
| tableValue = tableRepository.save(tableValue); | ||
| } | ||
| LOG.info("[CHRIS] TableValue: {}", tableValue); | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have to remove the logs starting with |
||
|
|
||
| List<RecordValue> recordValues = new ArrayList<>(); | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is essential to resolve a schema before startup