From d2e92ead7fd2f72b57585300457d0d4d3da5c9d3 Mon Sep 17 00:00:00 2001 From: katherinehhh Date: Mon, 15 May 2023 11:08:38 +0800 Subject: [PATCH] fix: field for attachment interface type without appends (#1856) * fix: attachment without appends * fix: association fields appends --- packages/core/client/src/block-provider/hooks/index.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/core/client/src/block-provider/hooks/index.ts b/packages/core/client/src/block-provider/hooks/index.ts index e3f821a3e..d5698cd8e 100644 --- a/packages/core/client/src/block-provider/hooks/index.ts +++ b/packages/core/client/src/block-provider/hooks/index.ts @@ -1101,10 +1101,7 @@ export const useAssociationNames = (collection) => { const data = schema.reduceProperties((buf, s) => { const collectionfield = getField(s.name) || (s['x-collection-field'] && getCollectionJoinField(s['x-collection-field'])); - if ( - collectionfield && - ['createdBy', 'updatedBy', 'o2m', 'obo', 'oho', 'm2o', 'm2m'].includes(collectionfield.interface) - ) { + if (collectionfield && ['hasOne', 'hasMany', 'belongsTo', 'belongsToMany'].includes(collectionfield.type)) { if (['Nester', 'SubTable'].includes(s['x-component-props']?.mode)) { associationValues.push(s.name); }