API 参考
    正在准备搜索索引...

    接口 InsertEvent<Entity>

    InsertEvent is an object that broadcaster sends to the entity subscriber when entity is inserted to the database.

    interface InsertEvent<Entity> {
        connection: DataSource;
        entity: Entity;
        entityId?: ObjectLiteral;
        manager: EntityManager;
        metadata: EntityMetadata;
        queryRunner: QueryRunner;
    }

    类型参数

    • Entity
    索引

    属性

    connection: DataSource

    Connection used in the event.

    entity: Entity

    Inserting event.

    entityId?: ObjectLiteral

    Id or ids of the entity being inserted.

    manager: EntityManager

    EntityManager used in the event transaction. All database operations in the subscribed event listener should be performed using this entity manager instance.

    metadata: EntityMetadata

    Metadata of the entity.

    queryRunner: QueryRunner

    QueryRunner used in the event transaction. All database operations in the subscribed event listener should be performed using this query runner instance.