Skip to content

Commit 62090fc

Browse files
biniamb-admike
authored andcommitted
fix(repository): change RelationType from numeric to string enums
1 parent 203fdf0 commit 62090fc

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

packages/repository/src/decorators/relation.decorator.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ import {camelCase} from 'lodash';
1212
// tslint:disable:no-any
1313

1414
export enum RelationType {
15-
belongsTo,
16-
hasOne,
17-
hasMany,
18-
embedsOne,
19-
embedsMany,
20-
referencesOne,
21-
referencesMany,
15+
belongsTo = 'belongsTo',
16+
hasOne = 'hasOne',
17+
hasMany = 'hasMany',
18+
embedsOne = 'embedsOne',
19+
embedsMany = 'embedsMany',
20+
referencesOne = 'referencesOne',
21+
referencesMany = 'referencesMany',
2222
}
2323

2424
export const RELATIONS_KEY = 'loopback:relations';

0 commit comments

Comments
 (0)