Refactor morph field name and morph data loader (#14299)
# Introduction Storing morph relation field names directly in database, using morphId to aggregate them Removing dynamic morph field metadata computation in schemas and data loader Will add integration tests on morph data loader entry closes https://github.com/twentyhq/core-team-issues/issues/1425 closes https://github.com/twentyhq/core-team-issues/issues/1424 closes https://github.com/twentyhq/core-team-issues/issues/1423
This commit is contained in:
+15
@@ -20,4 +20,19 @@ export const PET_CUSTOM_RELATION_FIELD_SEEDS: (FieldMetadataSeed & {
|
||||
],
|
||||
targetObjectMetadataNames: ['surveyResult', 'rocket'],
|
||||
},
|
||||
{
|
||||
type: FieldMetadataType.MORPH_RELATION,
|
||||
label: 'Helper of the Pet (rocket or survey)',
|
||||
name: 'helper',
|
||||
icon: 'IconRelationOneToMany',
|
||||
morphRelationsCreationPayload: [
|
||||
{
|
||||
type: RelationType.ONE_TO_MANY,
|
||||
targetObjectMetadataId: 'to-be-resolved-later',
|
||||
targetFieldLabel: 'Helped by',
|
||||
targetFieldIcon: 'IconRelationOneToMany',
|
||||
},
|
||||
],
|
||||
targetObjectMetadataNames: ['surveyResult', 'rocket'],
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user