jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: wrong? value type when querying repository
Date Fri, 17 Jun 2005 07:44:06 GMT
Hi Pawel,

pawel sabina wrote:
> i'am trying to query nodes with the following statement:
> test/objects//element(object, nt:unstructured)/(@touched)
> as the result i get one Value of type String, even if the type of toutched
> is Boolean.

This is probably because your property is based on a residual property 
definition with an undefined type. In that case the type for a column in 
the result table is always String and values are converted to String 
values. Nonetheless the property returned by the node iterator will 
yield the type of the actual property instance. In your case: boolean.

So, this is not a bug, but a feature ;)

If you want to be sure to get a Value instance of the correct type out 
of the result table, you need to declare your property as a non-residual 
with a specific type.


View raw message