fix: field for attachment interface type without appends (#1856)

* fix: attachment without appends

* fix: association fields  appends
This commit is contained in:
katherinehhh 2023-05-15 11:08:38 +08:00 committed by GitHub
parent 83749ccd53
commit d2e92ead7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}