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?

List<String> roleObjects = (List<String>) doc.getProperty("person", "roles");

This one is not surprising, for xs:list in a xs:simpleType the datastructure used by the core is an array.

Florent

--
Florent Guillaume, Director of R&D, Nuxeo
Open Source Enterprise Content Management (ECM)
http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87



_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm

Reply via email to