[OBJECT_CACHE_FLUSH_REQUIRED_WHEN_RELEASED] Remove FlatObjectMetadata custom fieldMetadataIds fk aggregator property (#17438)
# Introduction Currently refactoring `flatEntity` typing, encountering some tsc errors due to this fk aggregator custom override It shall now follow generic pattern leading to be named `fieldIds` Needs to flush object cache when released
This commit is contained in:
+2
-2
@@ -50,7 +50,7 @@ type JunctionConfigSeed = {
|
||||
// Helper type for flat entity maps
|
||||
type FlatMaps = {
|
||||
fieldMaps: { byId: Record<string, { name: string; morphId?: string }> };
|
||||
objectMaps: { byId: Record<string, { fieldMetadataIds: string[] }> };
|
||||
objectMaps: { byId: Record<string, { fieldIds: string[] }> };
|
||||
objectIdByName: Record<string, string>;
|
||||
};
|
||||
|
||||
@@ -482,7 +482,7 @@ export class DevSeederMetadataService {
|
||||
throw new Error(`Object metadata not found: ${objectName}`);
|
||||
}
|
||||
|
||||
for (const fieldId of objectMetadata.fieldMetadataIds) {
|
||||
for (const fieldId of objectMetadata.fieldIds) {
|
||||
if (flatMaps.fieldMaps.byId[fieldId]?.name === fieldName) {
|
||||
return fieldId;
|
||||
}
|
||||
|
||||
+1
-1
@@ -84,7 +84,7 @@ export const createStandardObjectFlatMetadata = <
|
||||
].id
|
||||
: null,
|
||||
targetTableName: 'DEPRECATED',
|
||||
fieldMetadataIds: [],
|
||||
fieldIds: [],
|
||||
indexMetadataIds: [],
|
||||
viewIds: [],
|
||||
createdAt: now,
|
||||
|
||||
+1
-1
@@ -77,7 +77,7 @@ export class DeleteObjectActionHandlerService extends WorkspaceMigrationRunnerAc
|
||||
const objectFlatFieldMetadatas =
|
||||
findManyFlatEntityByIdInFlatEntityMapsOrThrow({
|
||||
flatEntityMaps: flatFieldMetadataMaps,
|
||||
flatEntityIds: flatObjectMetadata.fieldMetadataIds,
|
||||
flatEntityIds: flatObjectMetadata.fieldIds,
|
||||
});
|
||||
const enumOrCompositeFlatFieldMetadatas = objectFlatFieldMetadatas.filter(
|
||||
(field) =>
|
||||
|
||||
+1
-1
@@ -96,7 +96,7 @@ export class UpdateObjectActionHandlerService extends WorkspaceMigrationRunnerAc
|
||||
const objectFlatFieldMetadatas =
|
||||
findManyFlatEntityByIdInFlatEntityMapsOrThrow({
|
||||
flatEntityMaps: flatFieldMetadataMaps,
|
||||
flatEntityIds: updatedObjectMetadata.fieldMetadataIds,
|
||||
flatEntityIds: updatedObjectMetadata.fieldIds,
|
||||
});
|
||||
const enumOrCompositeFlatFieldMetadatas =
|
||||
objectFlatFieldMetadatas.filter(
|
||||
|
||||
Reference in New Issue
Block a user