Skip to content

Commit 18a83fb

Browse files
fix(decorator-util): uncomment error
when testing with one of our production apps (gi-kis) we have two models (OrderLinkedForm & CoverSheetForm) which define both the same index FORMS_ORDER_ID_TYPE and extend Form and BaseForm, an error will occur when decorators are executed, this should work. for now we just uncomment the error
1 parent ef18185 commit 18a83fb

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/decorator/impl/index/util.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,10 @@ function initOrUpdateGSI(
3939
indexData: IndexData,
4040
): Partial<PropertyMetadata<any>> {
4141
if (indexes[indexData.name]) {
42-
throw new Error(
43-
'the property with name is already registered as key for index - one property can only define one key per index'
44-
)
42+
// TODO LOW:INVESTIGATE when we throw an error we have a problem where multiple different classes extend one base class, this will be executed multiple times
43+
// throw new Error(
44+
// 'the property with name is already registered as key for index - one property can only define one key per index'
45+
// )
4546
} else {
4647
indexes[indexData.name] = indexData.keyType
4748
}

0 commit comments

Comments
 (0)