incubator-graffito-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christophe Lombart <christophe.lomb...@gmail.com>
Subject Re: [Graffito-jcr-mapping] Persistence of null property
Date Fri, 09 Sep 2005 12:56:48 GMT
2005/9/9, Martin Koci <martin.koci@aura.cz>:
> 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;
> }
> 

That's funny ! I'm reviewing the null value. I almost finish with
collection based attribute.
After I'm going to review bean field and integrate your patch for the
atomic type converter.

> 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.

I didn't know. Can you send me the all the necessary files ?

Mime
View raw message