diff --git a/src/app/core/cache/models/normalized-template-item.model.ts b/src/app/core/cache/models/normalized-template-item.model.ts index 7a3259d74d..029306b2c3 100644 --- a/src/app/core/cache/models/normalized-template-item.model.ts +++ b/src/app/core/cache/models/normalized-template-item.model.ts @@ -1,4 +1,4 @@ -import { inheritSerialization, deserialize } from 'cerialize'; +import { inheritSerialization, deserialize, autoserializeAs } from 'cerialize'; import { mapsTo, relationship } from '../builders/build-decorators'; import { TemplateItem } from '../../shared/template-item.model'; @@ -12,6 +12,18 @@ import { Collection } from '../../shared/collection.model'; @inheritSerialization(NormalizedItem) export class NormalizedTemplateItem extends NormalizedItem { + /** + * The human-readable identifier of this DSpaceObject + */ + @autoserializeAs(String) + id: string; + + /** + * The universally unique identifier of this DSpaceObject + */ + @autoserializeAs(String, 'id') + uuid: string; + /** * The Collection that this item is a template for */ diff --git a/src/app/core/data/data.service.ts b/src/app/core/data/data.service.ts index 5a56fd5668..f20cc20b4c 100644 --- a/src/app/core/data/data.service.ts +++ b/src/app/core/data/data.service.ts @@ -261,6 +261,7 @@ export abstract class DataService implements UpdateDa * Add a new patch to the object cache * The patch is derived from the differences between the given object and its version in the object cache * @param {DSpaceObject} object The given object + * @param ignoreMetadataFields An optional list of metadata fields to ignore updates for (* is allowed as a wildcard, for example: dc.description.*) */ update(object: T, ignoreMetadataFields: string[] = []): Observable> { const ignoreMetadataFieldsPrefix = ignoreMetadataFields.map((field) => field.indexOf('*') > -1 ? field.slice(0, field.indexOf('*')) : field);