Thanks for all the details.
I've implemented a quick fix but hadn't time to test it. Give it a try.
Florian
// get the type
TypeDefinition type = null;
if (typeCache != null) {
PropertyData<?> typeProp =
properties.getProperties().get(PropertyIds.OBJECT_TYPE_ID);
if (typeProp instanceof PropertyId) {
String typeId = ((PropertyId)
typeProp).getFirstValue();
if (typeId != null) {
type = typeCache.getTypeDefinition(typeId);
}
}
if (type == null && objectId != null && propertyMode !=
PropertyMode.CHANGE) {
type =
typeCache.getTypeDefinitionForObject(objectId);
}
}
From what i can see the secondary types are never cached.
typeCache.getTypeDefinition(typeId)
returns a type, as the cache is self loading
and because type != null
typeCache.getTypeDefinitionForObject(objectId)
is never called
Michael
On Tue, Aug 20, 2013 at 11:14 AM, Michael Brackx <
[email protected]> wrote:
In
public static JSONObject convert(final Properties properties,
final
String objectId, final TypeCache typeCache,
final PropertyMode propertyMode, final boolean succinct)
{
only the primary type is considered to get the property definitions
Michael