Florent Guillaume wrote:
On 14 Apr 2008, at 11:50, Jean-Marc Orliaguet wrote:
Have you witnessed anything strange with this?
yes indeed, I have had the same problem with a string array on a
schema (similar to "dublincore:contributors"):
<xs:simpleType name="stringArray">
<xs:list itemType="xs:string" />
</xs:simpleType>
<xs:element name="roles" type="nxs:stringArray"/>
this line works in nuxeo-5.1.4:
Object[] roleObjects = (Object[]) doc.getProperty("person", "roles");
but these always fail raising a class cast exception:
it is a difficult bug to track further down in the code because it
works fine otherwise with DocumentModels *not* returned by the search
service.
String[] roleObjects = (String[]) doc.getProperty("person", "roles");
Could you track down what kind of object is returned here, so that we
fix the search service?
OK, I get:
doc.getProperty("person", "roles").getClass().getCanonicalName():
java.lang.Object[]
doc.getProperty("person", "roles").getClass().getComponentType(): class
java.lang.Object
/JM
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm