From c268600c990a6d1c5c4db0e2dd24c3e2b05a0a14 Mon Sep 17 00:00:00 2001 From: Jan Skrasek Date: Thu, 6 May 2021 22:49:09 +0200 Subject: [PATCH] fixed entity type resolution non expression without resolved as plugin type [closes #20] --- changelog.md | 2 ++ gradle.properties | 2 +- .../orm/intellij/typeProvider/CollectionTypeProvider.kt | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index b8a5977..44ba1c9 100644 --- a/changelog.md +++ b/changelog.md @@ -4,8 +4,10 @@ ### Added ### Fixed +- Fixed entity type resolution on IModel::getRepository() expression. ### Changed + ## [0.8.0] ### Added diff --git a/gradle.properties b/gradle.properties index 0c1b23e..0f7b38d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ pluginGroup = org.nextras.orm.intellij pluginName = Nextras Orm Plugin -pluginVersion = 0.8.0 +pluginVersion = 0.8.1 # See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html#intellij-platform-based-products-of-recent-ide-versions # for insight into build numbers and IntelliJ Platform versions. diff --git a/src/main/kotlin/org/nextras/orm/intellij/typeProvider/CollectionTypeProvider.kt b/src/main/kotlin/org/nextras/orm/intellij/typeProvider/CollectionTypeProvider.kt index 64d64fd..58fc4a0 100644 --- a/src/main/kotlin/org/nextras/orm/intellij/typeProvider/CollectionTypeProvider.kt +++ b/src/main/kotlin/org/nextras/orm/intellij/typeProvider/CollectionTypeProvider.kt @@ -45,6 +45,11 @@ class CollectionTypeProvider : PhpTypeProvider4 { type.add(subType) } } + if (type.isEmpty) { + parent.type.types.forEach { subType -> + type.add("#$key$subType") + } + } return type } is FieldReference -> {