From 70e7df9b1598a06aaa600ad889ce9060c497359f Mon Sep 17 00:00:00 2001 From: i341658 Date: Wed, 15 Jan 2025 11:51:54 +0100 Subject: [PATCH] chore: minor changes --- packages/odata-common/src/selectable/edm-type-field.ts | 2 -- packages/odata-v4/src/de-serializers/converters.ts | 1 + .../odata-v4/src/request-builder/update-request-builder.spec.ts | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/odata-common/src/selectable/edm-type-field.ts b/packages/odata-common/src/selectable/edm-type-field.ts index c61e064039..3969bff207 100644 --- a/packages/odata-common/src/selectable/edm-type-field.ts +++ b/packages/odata-common/src/selectable/edm-type-field.ts @@ -56,7 +56,6 @@ export class EdmTypeField< implements EntityIdentifiable { readonly _entity: EntityT; - readonly precision?: number; /** * Creates an instance of EdmTypeField. @@ -74,7 +73,6 @@ export class EdmTypeField< fieldOptions?: FieldOptions ) { super(fieldName, getEntityConstructor(_fieldOf), fieldOptions); - this.precision = fieldOptions?.precision; } /** diff --git a/packages/odata-v4/src/de-serializers/converters.ts b/packages/odata-v4/src/de-serializers/converters.ts index 21c1f3d435..c3f74e9cb4 100644 --- a/packages/odata-v4/src/de-serializers/converters.ts +++ b/packages/odata-v4/src/de-serializers/converters.ts @@ -46,6 +46,7 @@ export function serializeToDateTimeOffset( value: moment.Moment, precision?: number ): string { + console.log('Precision being logged in the serialiser', precision); // If precision is defined, create a format with decimal places if (precision !== undefined && precision !== null) { const precisionFormat = new Array(precision).fill('S').join(''); diff --git a/packages/odata-v4/src/request-builder/update-request-builder.spec.ts b/packages/odata-v4/src/request-builder/update-request-builder.spec.ts index 489c395a60..6b0dacd205 100644 --- a/packages/odata-v4/src/request-builder/update-request-builder.spec.ts +++ b/packages/odata-v4/src/request-builder/update-request-builder.spec.ts @@ -19,6 +19,7 @@ function createTestEntity() { .keyPropertyGuid(keyPropGuid) .keyPropertyString(keyPropString) .keyDateProperty(keyPropDate) + .dateTimeOffSetProperty(moment()) .int32Property(int32Prop) .build(); }