diff --git a/src/EntityMetaData.js b/src/EntityMetaData.js index 53e5151..63e3d9e 100644 --- a/src/EntityMetaData.js +++ b/src/EntityMetaData.js @@ -69,6 +69,12 @@ import SubjectProgramEligibility from "./program/SubjectProgramEligibility"; import MenuItem from "./application/MenuItem"; import UserSubjectAssignment from "./assignment/UserSubjectAssignment"; import DashboardFilter from "./reports/DashboardFilter"; +import KeyValue from "./application/KeyValue"; +import Observation from "./Observation"; +import Format from "./application/Format"; +import StringKeyNumericValue from "./application/StringKeyNumericValue"; +import ChecklistItemStatus from "./ChecklistItemStatus"; +import Point from "./geo/Point"; const refData = (clazz, { res, @@ -502,7 +508,11 @@ class EntityMetaData { } static entitiesLoadedFromServer() { - return _.differenceBy(EntityMappingConfig.getInstance().getEntities(), [Settings, LocaleMapping], "schema.name"); + return _.differenceBy(EntityMappingConfig.getInstance().getEntities(), [Settings, LocaleMapping].concat(EntityMetaData.embeddedEntities()), "schema.name"); + } + + static embeddedEntities() { + return [KeyValue, Observation, Format, StringKeyNumericValue, ChecklistItemStatus, Point]; } static findByName(entityName) { diff --git a/test/EntitiesMetaDataTest.js b/test/EntitiesMetaDataTest.js index 0959d7e..90c540e 100644 --- a/test/EntitiesMetaDataTest.js +++ b/test/EntitiesMetaDataTest.js @@ -7,6 +7,7 @@ describe('EntitiesMetaDataTest', () => { it('entitiesLoadedFromServer', () => { var entitiesLoadedFromServer = EntityMetaData.entitiesLoadedFromServer(); assert.notIncludeMembers(entitiesLoadedFromServer, [Settings, Individual]); + assert.notIncludeMembers(entitiesLoadedFromServer, EntityMetaData.embeddedEntities()); }); describe('model', function () {