typeorm#ChildEntity TypeScript Examples
The following examples show how to use
typeorm#ChildEntity.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ActivityStateFilterCriteria.ts From context-mod with MIT License | 6 votes |
@ChildEntity()
export class ActivityStateFilterCriteria extends FilterCriteria<TypedActivityState> {
type: string = filterCriteriaTypeIdentifiers.activityState;
constructor(data?: FilterCriteriaOptions<TypedActivityState>) {
super(data);
if(data !== undefined) {
this.generateId();
}
}
}
Example #2
Source File: ActivityStateFilterCriteriaResult.ts From context-mod with MIT License | 6 votes |
@ChildEntity()
export class ActivityStateFilterCriteriaResult extends FilterCriteriaResult<TypedActivityState> {
type: string = 'activityState';
@ManyToOne(type => ActivityStateFilterCriteria, {cascade: ['insert'], eager: true})
criteria!: ActivityStateFilterCriteria
constructor(data?: IFilterCriteriaResult<TypedActivityState>) {
super(data);
if(data !== undefined) {
this.criteria = new ActivityStateFilterCriteria(data.criteria);
}
}
}
Example #3
Source File: ActivityStateFilterResult.ts From context-mod with MIT License | 6 votes |
@ChildEntity()
export class ActivityStateFilterResult extends FilterResult<TypedActivityState> {
type: string = 'activityState';
@OneToMany(type => ActivityStateFilterCriteriaResult, obj => obj.filterResult, {cascade: ['insert'], eager: true})
criteriaResults!: ActivityStateFilterCriteriaResult[]
constructor(data?: IFilterResult<TypedActivityState>) {
super(data);
if(data !== undefined) {
this.criteriaResults = data.criteriaResults.map(x => new ActivityStateFilterCriteriaResult(x))
}
}
}
Example #4
Source File: AuthorFilterCriteria.ts From context-mod with MIT License | 6 votes |
@ChildEntity()
export class AuthorFilterCriteria extends FilterCriteria<AuthorCriteria> {
type: string = filterCriteriaTypeIdentifiers.author;
constructor(data?: FilterCriteriaOptions<AuthorCriteria>) {
super(data);
if(data !== undefined) {
this.generateId();
}
}
}
Example #5
Source File: AuthorFilterResult.ts From context-mod with MIT License | 6 votes |
@ChildEntity()
export class AuthorFilterResult extends FilterResult<AuthorCriteria> {
type: string = 'author';
@OneToMany(type => AuthorFilterCriteriaResult, obj => obj.filterResult, {cascade: ['insert'], eager: true})
criteriaResults!: AuthorFilterCriteriaResult[]
constructor(data?: IFilterResult<AuthorCriteria>) {
super(data);
if(data !== undefined) {
this.criteriaResults = data.criteriaResults.map(x => new AuthorFilterCriteriaResult(x))
}
}
}
Example #6
Source File: FilterCriteriaResult.ts From context-mod with MIT License | 6 votes |
@ChildEntity()
export class AuthorFilterCriteriaResult extends FilterCriteriaResult<AuthorCriteria> {
type: string = 'author';
@ManyToOne(type => AuthorFilterCriteria, {cascade: ['insert'], eager: true})
criteria!: AuthorFilterCriteria
constructor(data?: IFilterCriteriaResult<AuthorCriteria>) {
super(data);
if (data !== undefined) {
this.criteria = new AuthorFilterCriteria(data.criteria);
}
}
}
Example #7
Source File: CheckToRuleResultEntity.ts From context-mod with MIT License | 6 votes |
@ChildEntity()
export class CheckToRuleResultEntity extends RunnableToResultEntity<CheckResultEntity, RuleResultEntity> {
@ManyToOne(type => CheckResultEntity, act => act.ruleResults)
runnable?: CheckResultEntity;
@ManyToOne(type => RuleResultEntity, {cascade: ['insert'], eager: true})
result!: RuleResultEntity
}
Example #8
Source File: CheckToRuleSetResultEntity.ts From context-mod with MIT License | 6 votes |
@ChildEntity()
export class CheckToRuleSetResultEntity extends RunnableToResultEntity<CheckResultEntity, RuleSetResultEntity> {
@ManyToOne(type => CheckResultEntity, act => act.ruleSetResults)
runnable?: CheckResultEntity;
@ManyToOne(type => RuleSetResultEntity, {cascade: ['insert'], eager: true})
result!: RuleSetResultEntity
}
Example #9
Source File: RuleSetToRuleResultEntity.ts From context-mod with MIT License | 6 votes |
@ChildEntity()
export class RuleSetToRuleResultEntity extends RunnableToResultEntity<RuleSetResultEntity, RuleResultEntity> {
@ManyToOne(type => RuleSetResultEntity, act => act._ruleResults)
runnable?: RuleSetResultEntity;
@ManyToOne(type => RuleResultEntity, {cascade: ['insert'], eager: true})
result!: RuleResultEntity
}
Example #10
Source File: EventsRunState.ts From context-mod with MIT License | 5 votes |
@ChildEntity()
export class EventsRunState extends EntityRunState {
type = 'events';
}
Example #11
Source File: ManagerRunState.ts From context-mod with MIT License | 5 votes |
@ChildEntity()
export class ManagerRunState extends EntityRunState {
type = 'manager';
}
Example #12
Source File: QueueRunState.ts From context-mod with MIT License | 5 votes |
@ChildEntity()
export class QueueRunState extends EntityRunState {
type = 'queue';
}