update TestUtil to test Embeddable classes, not just Entity classes

This commit is contained in:
Vadim Karantayer 2021-09-03 10:40:54 -04:00
parent fed755523f
commit b29a61df40
1 changed files with 3 additions and 1 deletions

View File

@ -35,6 +35,7 @@ import org.hl7.fhir.instance.model.api.IBaseResource;
import org.hl7.fhir.r4.model.InstantType; import org.hl7.fhir.r4.model.InstantType;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.Embedded; import javax.persistence.Embedded;
import javax.persistence.EmbeddedId; import javax.persistence.EmbeddedId;
import javax.persistence.Entity; import javax.persistence.Entity;
@ -106,7 +107,8 @@ public class TestUtil {
for (ClassInfo classInfo : classes) { for (ClassInfo classInfo : classes) {
Class<?> clazz = Class.forName(classInfo.getName()); Class<?> clazz = Class.forName(classInfo.getName());
Entity entity = clazz.getAnnotation(Entity.class); Entity entity = clazz.getAnnotation(Entity.class);
if (entity == null) { Embeddable embeddable = clazz.getAnnotation(Embeddable.class);
if (entity == null && embeddable == null) {
continue; continue;
} }