if (m_pmi.currentTransaction().isActive()) { m_state.readWithDatastoreTxn(); } else { m_state.readOutsideTxn(); }
    public Object getObjectField(PersistenceCapable pc, int field,                                 Object currentValue) {        final Class declaredClass =            (Class) m_pmi.getAllTypes(pc.getClass()).get(field);        final String name = name(pc, field);        if (isComponent(pc, field)) {            if (m_components.containsKey(name)) {                return m_components.get(name);            } else {                // XXX: what to do about currentValue                Class klass = declaredClass;                if (klass.equals(List.class)) {                    klass = CRPList.class;                } else if (klass.equals(Map.class)) {                    klass = CRPMap.class;                }                Object obj = m_pmi.newPC                    (m_pmap, klass, m_container, name + "$");                if (klass.equals(CRPList.class)) {                    ((CRPList) obj).setFieldName(name);                }                m_components.put(name, obj);                return obj;            }        } else {            Property prop = prop(pc, field);            if (prop.isKeyProperty()) {                return getPropertyMap().get(prop);            } else if (prop.isCollection()) {                return new CRPSet(ssn(), m_container, prop);            } else {                return ssn().get(pc, prop);            }        }    }