From ea7291ca51334eff7ab59172a1b89214d07122a2 Mon Sep 17 00:00:00 2001 From: Alexander Hain Date: Tue, 11 Jun 2024 11:22:30 +0200 Subject: [PATCH] nullable in Kotlin vs JPA for OneToOne association (#26) (#27) --- .../archunit/rules/jpa/KotlinEntityNullableCondition.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/kotlin/io/cloudflight/cleancode/archunit/rules/jpa/KotlinEntityNullableCondition.kt b/src/main/kotlin/io/cloudflight/cleancode/archunit/rules/jpa/KotlinEntityNullableCondition.kt index 7023b89..2060872 100644 --- a/src/main/kotlin/io/cloudflight/cleancode/archunit/rules/jpa/KotlinEntityNullableCondition.kt +++ b/src/main/kotlin/io/cloudflight/cleancode/archunit/rules/jpa/KotlinEntityNullableCondition.kt @@ -63,6 +63,7 @@ internal class KotlinEntityNullableCondition : findAnnotation(memberProperty) { false }?.let { nullable = it } findAnnotation(memberProperty) { nullableIfNotTypeLong(memberProperty) }?.let { nullable = it } findAnnotation(memberProperty) { manyToOne -> manyToOne.optional }?.let { nullable = it } + findAnnotation(memberProperty) { oneToOne -> oneToOne.optional }?.let { nullable = it } return nullable }