From b74d77faf2e57d8f00a3fcf29d0e9847deb8c172 Mon Sep 17 00:00:00 2001 From: Konstantin Krivopustov Date: Tue, 26 Mar 2013 15:13:59 +0000 Subject: [PATCH] Minor fixes --- .../portal/restapi/template/MetaClassRepresentation.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/portal/src/com/haulmont/cuba/portal/restapi/template/MetaClassRepresentation.java b/modules/portal/src/com/haulmont/cuba/portal/restapi/template/MetaClassRepresentation.java index 12e26bdb5e..b120a4f3c0 100644 --- a/modules/portal/src/com/haulmont/cuba/portal/restapi/template/MetaClassRepresentation.java +++ b/modules/portal/src/com/haulmont/cuba/portal/restapi/template/MetaClassRepresentation.java @@ -193,14 +193,15 @@ public class MetaClassRepresentation { } private static MetaClass getMetaClass(Class clazz) { - return AppBeans.get(Metadata.class).getSession().getClass(clazz); + Metadata metadata = AppBeans.get(Metadata.class); + return metadata.getExtendedEntities().getEffectiveMetaClass(metadata.getClassNN(clazz)); } private static boolean viewPropertyReadPermitted(MetaClass meta, ViewProperty viewProperty) { if (!attrViewPermitted(meta, viewProperty.getName())) return false; - MetaProperty metaProperty = meta.getProperty(viewProperty.getName()); + MetaProperty metaProperty = meta.getPropertyNN(viewProperty.getName()); if (metaProperty.getType() == MetaProperty.Type.DATATYPE || metaProperty.getType() == MetaProperty.Type.ENUM) return true;