mirror of
https://github.com/typeorm/typeorm.git
synced 2025-12-08 21:26:23 +00:00
fixed issues
This commit is contained in:
parent
5daf0d3ef5
commit
fb29d6cbe4
@ -306,9 +306,9 @@ export class EntityManager {
|
||||
* Should be used when you want quickly and efficiently and and remove a many-to-many relation between two entities.
|
||||
* Note that event listeners and event subscribers won't work (and will not send any events) when using this operation.
|
||||
*/
|
||||
async addAndRemoveFromRelation<Entity>(entityClass: ConstructorFunction<Entity>|Function, relation: string, entityId: any, addRelatedEntityIds: any[], removeRelatedEntityIds: any[]): Promise<void>;
|
||||
async addAndRemoveFromRelation<Entity>(entityClass: ConstructorFunction<Entity>|Function, relation: ((t: Entity) => string|any), entityId: any, addRelatedEntityIds: any[], removeRelatedEntityIds: any[]): Promise<void>;
|
||||
async addAndRemoveFromRelation<Entity>(entityClass: ConstructorFunction<Entity>|Function, relation: string|((t: Entity) => string|any), entityId: any, addRelatedEntityIds: any[], removeRelatedEntityIds: any[]): Promise<void> {
|
||||
addAndRemoveFromRelation<Entity>(entityClass: ConstructorFunction<Entity>|Function, relation: string, entityId: any, addRelatedEntityIds: any[], removeRelatedEntityIds: any[]): Promise<void>;
|
||||
addAndRemoveFromRelation<Entity>(entityClass: ConstructorFunction<Entity>|Function, relation: ((t: Entity) => string|any), entityId: any, addRelatedEntityIds: any[], removeRelatedEntityIds: any[]): Promise<void>;
|
||||
addAndRemoveFromRelation<Entity>(entityClass: ConstructorFunction<Entity>|Function, relation: string|((t: Entity) => string|any), entityId: any, addRelatedEntityIds: any[], removeRelatedEntityIds: any[]): Promise<void> {
|
||||
return this.getRepository(entityClass).addAndRemoveFromRelation(relation as any, entityId, addRelatedEntityIds, removeRelatedEntityIds);
|
||||
}
|
||||
|
||||
@ -316,7 +316,7 @@ export class EntityManager {
|
||||
* Removes entity with the given id.
|
||||
* Note that event listeners and event subscribers won't work (and will not send any events) when using this operation.
|
||||
*/
|
||||
removeById<Entity>(entityClass: ConstructorFunction<Entity>|Function, id: any) {
|
||||
removeById<Entity>(entityClass: ConstructorFunction<Entity>|Function, id: any): Promise<void> {
|
||||
return this.getRepository(entityClass).removeById(id);
|
||||
}
|
||||
|
||||
@ -324,7 +324,7 @@ export class EntityManager {
|
||||
* Removes all entities with the given ids.
|
||||
* Note that event listeners and event subscribers won't work (and will not send any events) when using this operation.
|
||||
*/
|
||||
removeByIds<Entity>(entityClass: ConstructorFunction<Entity>|Function, ids: any[]) {
|
||||
removeByIds<Entity>(entityClass: ConstructorFunction<Entity>|Function, ids: any[]): Promise<void> {
|
||||
return this.getRepository(entityClass).removeByIds(ids);
|
||||
}
|
||||
|
||||
|
||||
@ -289,7 +289,7 @@ export class ReactiveEntityManager {
|
||||
* Removes entity with the given id.
|
||||
* Note that event listeners and event subscribers won't work (and will not send any events) when using this operation.
|
||||
*/
|
||||
removeById<Entity>(entityClass: ConstructorFunction<Entity>|Function, id: any) {
|
||||
removeById<Entity>(entityClass: ConstructorFunction<Entity>|Function, id: any): Rx.Observable<void> {
|
||||
return this.getReactiveRepository(entityClass).removeById(id);
|
||||
}
|
||||
|
||||
@ -297,11 +297,10 @@ export class ReactiveEntityManager {
|
||||
* Removes all entities with the given ids.
|
||||
* Note that event listeners and event subscribers won't work (and will not send any events) when using this operation.
|
||||
*/
|
||||
removeByIds<Entity>(entityClass: ConstructorFunction<Entity>|Function, ids: any[]) {
|
||||
removeByIds<Entity>(entityClass: ConstructorFunction<Entity>|Function, ids: any[]): Rx.Observable<void> {
|
||||
return this.getReactiveRepository(entityClass).removeByIds(ids);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Roots are entities that have no ancestors. Finds them all.
|
||||
*/
|
||||
|
||||
@ -257,7 +257,7 @@ export class ReactiveRepository<Entity> {
|
||||
* Removes entity with the given id.
|
||||
* Note that event listeners and event subscribers won't work (and will not send any events) when using this operation.
|
||||
*/
|
||||
removeById(id: any) {
|
||||
removeById(id: any): Rx.Observable<void> {
|
||||
return Rx.Observable.fromPromise(this.repository.removeById(id));
|
||||
}
|
||||
|
||||
@ -265,7 +265,7 @@ export class ReactiveRepository<Entity> {
|
||||
* Removes all entities with the given ids.
|
||||
* Note that event listeners and event subscribers won't work (and will not send any events) when using this operation.
|
||||
*/
|
||||
removeByIds(ids: any[]) {
|
||||
removeByIds(ids: any[]): Rx.Observable<void> {
|
||||
return Rx.Observable.fromPromise(this.repository.removeByIds(ids));
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user