feat: add targetFieldMetadataId and migration script for relations (#9793)
Fix https://github.com/twentyhq/core-team-issues/issues/238 and https://github.com/twentyhq/core-team-issues/issues/239
This commit is contained in:
@ -112,6 +112,12 @@ export class ObjectMetadataEntity implements ObjectMetadataInterface {
|
||||
)
|
||||
toRelations: Relation<RelationMetadataEntity[]>;
|
||||
|
||||
@OneToMany(
|
||||
() => FieldMetadataEntity,
|
||||
(field) => field.relationTargetObjectMetadataId,
|
||||
)
|
||||
targetRelationFields: Relation<FieldMetadataEntity[]>;
|
||||
|
||||
@ManyToOne(() => DataSourceEntity, (dataSource) => dataSource.objects, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user