Merge pull request #2953 from hapifhir/2952

update TestUtil to test Embeddable classes, not just Entity classes
This commit is contained in:
Tadgh 2021-09-03 11:49:37 -04:00 committed by GitHub
commit 28cc51393b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.Embedded;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
@ -106,7 +107,8 @@ public class TestUtil {
for (ClassInfo classInfo : classes) {
Class<?> clazz = Class.forName(classInfo.getName());
Entity entity = clazz.getAnnotation(Entity.class);
if (entity == null) {
Embeddable embeddable = clazz.getAnnotation(Embeddable.class);
if (entity == null && embeddable == null) {
continue;
}