From 595e0c3be2e929a4d0f9826dfa673085c3187559 Mon Sep 17 00:00:00 2001 From: Yuriy Movchan Date: Fri, 8 Nov 2024 23:35:36 +0300 Subject: [PATCH] fix(jans-orm): throw exception if table in DB is not exists (#10096) fix(jans-orm): Throw exception if table in DB is not exists Signed-off-by: Yuriy Movchan --- .../main/java/io/jans/orm/sql/impl/SqlFilterConverter.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/jans-orm/sql/src/main/java/io/jans/orm/sql/impl/SqlFilterConverter.java b/jans-orm/sql/src/main/java/io/jans/orm/sql/impl/SqlFilterConverter.java index 54275abe1a3..269c1e60f74 100644 --- a/jans-orm/sql/src/main/java/io/jans/orm/sql/impl/SqlFilterConverter.java +++ b/jans-orm/sql/src/main/java/io/jans/orm/sql/impl/SqlFilterConverter.java @@ -515,6 +515,10 @@ private String resolveAttributeName(TableMapping tableMapping, Filter filter) th } String attributeNameLower = attributeName.toLowerCase(); + + if (tableMapping.getColumTypes() == null) { + throw new SearchException(String.format("Unknown table '%s' and it's column '%s'", tableMapping.getTableName(), attributeName)); + } AttributeType attributeType = tableMapping.getColumTypes().get(attributeNameLower); if (attributeType == null) {