Add onDeleteAction to RelationMetadata (#4100)
* Add onDeleteAction to relationMetadata * rename to SET NULL * fix migration * fix migration * fix after review
This commit is contained in:
@ -43,4 +43,5 @@ export type FieldComparatorResult =
|
||||
|
||||
export type RelationComparatorResult =
|
||||
| ComparatorCreateResult<Partial<RelationMetadataEntity>>
|
||||
| ComparatorDeleteResult<RelationMetadataEntity>;
|
||||
| ComparatorDeleteResult<RelationMetadataEntity>
|
||||
| ComparatorUpdateResult<Partial<RelationMetadataEntity>>;
|
||||
|
||||
@ -0,0 +1,10 @@
|
||||
import { ReflectRelationMetadata } from 'src/workspace/workspace-sync-metadata/interfaces/reflect-Relation-metadata.interface';
|
||||
|
||||
export type PartialRelationMetadata = ReflectRelationMetadata & {
|
||||
id: string;
|
||||
workspaceId: string;
|
||||
fromObjectMetadataId: string;
|
||||
toObjectMetadataId: string;
|
||||
fromFieldMetadataId: string;
|
||||
toFieldMetadataId: string;
|
||||
};
|
||||
@ -1,11 +1,15 @@
|
||||
import { GateDecoratorParams } from 'src/workspace/workspace-sync-metadata/interfaces/gate-decorator.interface';
|
||||
|
||||
import { RelationMetadataType } from 'src/metadata/relation-metadata/relation-metadata.entity';
|
||||
import {
|
||||
RelationOnDeleteAction,
|
||||
RelationMetadataType,
|
||||
} from 'src/metadata/relation-metadata/relation-metadata.entity';
|
||||
|
||||
export interface RelationMetadataDecoratorParams {
|
||||
type: RelationMetadataType;
|
||||
objectName: string;
|
||||
inverseSideFieldName?: string;
|
||||
onDelete?: RelationOnDeleteAction;
|
||||
}
|
||||
|
||||
export interface ReflectRelationMetadata {
|
||||
@ -15,4 +19,5 @@ export interface ReflectRelationMetadata {
|
||||
fromFieldMetadataName: string;
|
||||
toFieldMetadataName: string;
|
||||
gate?: GateDecoratorParams;
|
||||
onDelete: RelationOnDeleteAction;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user