From b581702df4df254dd7503d6210886988573e1322 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Thu, 2 Jan 2025 23:01:13 +0100 Subject: [PATCH] [FIX] corrent the search of primary key to support Morphia --- src/org/kar/archidata/annotation/AnnotationTools.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/org/kar/archidata/annotation/AnnotationTools.java b/src/org/kar/archidata/annotation/AnnotationTools.java index 9b10cc5..f83c103 100644 --- a/src/org/kar/archidata/annotation/AnnotationTools.java +++ b/src/org/kar/archidata/annotation/AnnotationTools.java @@ -351,7 +351,10 @@ public class AnnotationTools { } public static boolean isIdField(final Field element) { - return element.getDeclaredAnnotationsByType(Id.class).length != 0; + if (element.getDeclaredAnnotationsByType(Id.class).length != 0) { + return true; + } + return element.getDeclaredAnnotationsByType(dev.morphia.annotations.Id.class).length != 0; } // Note: delete field can not be renamed with OptionRenameColumn