diff --git a/src/modules/entity-viewer/viewer/component/entity-grid/EntityGridCellDetail.vue b/src/modules/entity-viewer/viewer/component/entity-grid/EntityGridCellDetail.vue index 88027043..f54ade61 100644 --- a/src/modules/entity-viewer/viewer/component/entity-grid/EntityGridCellDetail.vue +++ b/src/modules/entity-viewer/viewer/component/entity-grid/EntityGridCellDetail.vue @@ -60,6 +60,7 @@ const rawDataType = computed(() => { const propertyName = props.propertyDescriptor.key.name switch (propertyName) { case StaticEntityProperties.PrimaryKey: return Scalar.Integer + case StaticEntityProperties.Version: return Scalar.Integer case StaticEntityProperties.Locales: return Scalar.LocaleArray case StaticEntityProperties.PriceInnerRecordHandling: return Scalar.String default: return undefined diff --git a/src/modules/entity-viewer/viewer/model/StaticEntityProperties.ts b/src/modules/entity-viewer/viewer/model/StaticEntityProperties.ts index 4c33e3ab..c4bc51bb 100644 --- a/src/modules/entity-viewer/viewer/model/StaticEntityProperties.ts +++ b/src/modules/entity-viewer/viewer/model/StaticEntityProperties.ts @@ -3,6 +3,7 @@ */ export enum StaticEntityProperties { PrimaryKey = 'primaryKey', + Version = 'version', ParentPrimaryKey = 'parentPrimaryKey', Locales = 'locales', PriceInnerRecordHandling = 'priceInnerRecordHandling' diff --git a/src/modules/entity-viewer/viewer/service/EntityViewerService.ts b/src/modules/entity-viewer/viewer/service/EntityViewerService.ts index 050c4a59..8bc6d812 100644 --- a/src/modules/entity-viewer/viewer/service/EntityViewerService.ts +++ b/src/modules/entity-viewer/viewer/service/EntityViewerService.ts @@ -270,6 +270,15 @@ export class EntityViewerService { undefined, ImmutableList() )) + descriptors.push(new EntityPropertyDescriptor( + EntityPropertyType.Entity, + EntityPropertyKey.entity(StaticEntityProperties.Version), + 'Version', + 'Version', + undefined, + undefined, + ImmutableList() + )) if (entitySchema.withHierarchy.getOrElse(false)) { descriptors.push(new EntityPropertyDescriptor( EntityPropertyType.Entity, diff --git a/src/modules/entity-viewer/viewer/service/EvitaQLQueryExecutor.ts b/src/modules/entity-viewer/viewer/service/EvitaQLQueryExecutor.ts index 345f6afd..ef34fe04 100644 --- a/src/modules/entity-viewer/viewer/service/EvitaQLQueryExecutor.ts +++ b/src/modules/entity-viewer/viewer/service/EvitaQLQueryExecutor.ts @@ -70,9 +70,11 @@ export class EvitaQLQueryExecutor extends QueryExecutor { flattenedProperties.push([ EntityPropertyKey.entity(StaticEntityProperties.PrimaryKey), - this.wrapRawValueIntoNativeValue( - Object(entity.primaryKey) - ), + this.wrapRawValueIntoNativeValue(entity.primaryKey) + ]) + flattenedProperties.push([ + EntityPropertyKey.entity(StaticEntityProperties.Version), + this.wrapRawValueIntoNativeValue(entity.version) ]) flattenedProperties.push(this.flattenParent(entity)) diff --git a/src/modules/entity-viewer/viewer/service/GraphQLQueryExecutor.ts b/src/modules/entity-viewer/viewer/service/GraphQLQueryExecutor.ts index b50fc936..fadd9222 100644 --- a/src/modules/entity-viewer/viewer/service/GraphQLQueryExecutor.ts +++ b/src/modules/entity-viewer/viewer/service/GraphQLQueryExecutor.ts @@ -46,6 +46,7 @@ export class GraphQLQueryExecutor extends QueryExecutor { const flattenedProperties: (WritableEntityProperty | undefined)[] = [] flattenedProperties.push([EntityPropertyKey.entity(StaticEntityProperties.PrimaryKey), this.wrapRawValueIntoNativeValue(entity[StaticEntityProperties.PrimaryKey])]) + flattenedProperties.push([EntityPropertyKey.entity(StaticEntityProperties.Version), this.wrapRawValueIntoNativeValue(entity[StaticEntityProperties.Version])]) flattenedProperties.push(this.flattenParent(dataPointer, entity)) flattenedProperties.push([EntityPropertyKey.entity(StaticEntityProperties.Locales), this.wrapRawValueIntoNativeValue(entity[StaticEntityProperties.Locales])]) flattenedProperties.push([EntityPropertyKey.entity(StaticEntityProperties.PriceInnerRecordHandling), this.wrapRawValueIntoNativeValue(entity[StaticEntityProperties.PriceInnerRecordHandling])])