Skip to content

Commit

Permalink
fix remarks
Browse files Browse the repository at this point in the history
  • Loading branch information
askhat-abishev committed Jan 22, 2025
1 parent 5dc444c commit e62db38
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ public Resource toEntity(org.folio.ld.dictionary.model.Resource model) {

@Mapping(target = "folioMetadata",
expression = "java(model.getFolioMetadata() != null ? mapFolioMetadata(model.getFolioMetadata(), resource) : null)")
@Mapping(target = "rawMarc",
expression = "java(model.getRawMarc() != null ? mapRawMarc(model.getRawMarc(), resource) : null)")
@Mapping(target = "unmappedMarc",
expression = "java(model.getUnmappedMarc() != null ? mapUnmappedMarc(model.getUnmappedMarc(), resource) : null)")
protected abstract Resource toEntity(org.folio.ld.dictionary.model.Resource model,
@Context CyclicGraphContext cycleContext);

Expand Down Expand Up @@ -67,7 +67,7 @@ protected abstract FolioMetadata mapFolioMetadata(org.folio.ld.dictionary.model.
Resource resource);

@Mapping(source = "resource", target = "resource")
protected abstract RawMarc mapRawMarc(org.folio.ld.dictionary.model.RawMarc rawMarc, Resource resource);
protected abstract RawMarc mapUnmappedMarc(org.folio.ld.dictionary.model.RawMarc unmappedMarc, Resource resource);

@Qualifier
@Target(ElementType.METHOD)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public class Resource implements Persistable<Long> {

@OneToOne(cascade = ALL, mappedBy = "resource", orphanRemoval = true)
@PrimaryKeyJoinColumn
private RawMarc rawMarc;
private RawMarc unmappedMarc;

@Column(name = "created_date", updatable = false, nullable = false)
private Timestamp createdDate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ create table if not exists raw_marcs (
content jsonb null
);

comment on table raw_marcs is 'Stores MARC records associated with LD resources';
comment on table raw_marcs is 'Store unmapped MARC records associated with an Instance resource. Applicable only for Instance resources';
comment on column raw_marcs.resource_hash is 'The unique hash identifier for the resource';
comment on column raw_marcs.content is 'JSON representation of MARC record';

0 comments on commit e62db38

Please sign in to comment.