Fix type of generated m2m fields

Fixes #861
This commit is contained in:
rijkvanzanten
2020-11-03 16:45:06 -05:00
parent f2d41590a8
commit bd388b93d9

View File

@@ -365,9 +365,7 @@ function initLocalStore(collection: string, field: string, type: typeof localTyp
$type: 'manyCurrent',
collection: junctionCollection,
field: manyCurrent,
type: collectionExists(junctionCollection)
? fieldsStore.getPrimaryKeyFieldForCollection(junctionCollection)?.type
: 'integer',
type: fieldsStore.getPrimaryKeyFieldForCollection(collection)!.type,
schema: {},
meta: {
hidden: true,