incubator-graffito-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Koci <martin.k...@aura.cz>
Subject [Graffito-jcr-mapping] Persistence of null property
Date Fri, 09 Sep 2005 12:49:12 GMT
If I persist POJO with some property of value null this property will 
not be saved in JCR. JCR does not know null properties - calling 
Node.setProperty(propertyName, null) simply means that property will not 
exists.

So in AtomicTypeConverter, method getJavaObjectFromJcr is not possible 
to call:

    long beanPropValue = node.getProperty(jcrPropName).getLong();
    return new Long(beanPropValue);

but
if (node.hasProperty(jcrPropName) == true) {
                long beanPropValue = 
node.getProperty(jcrPropName).getLong();
                return new Long(beanPropValue);
} else {
         return null;
}

Something completely diffrent: Have you, Graffito developers,  
configuration for code formatter in Eclipse? It can be shared in 
properties file and stored in hidden directory .settings in project 
directory.

Martin


Mime
View raw message