I have a BBDD table with XMLType column ("atributos") for Oracle 10g, and HQL with Xpath not works.
The xml structure:
<atributos> <atributo id="1" valor="6"/> <atributo id="52" valor="1"/> <atributo id="51" valor="1"/> <atributo id="6" valor="1"/> </atributos>
My query:
SELECT extractValue(d.atributos, '/atributos/atributo[@id=\"52\"]/@valor') from DocumentacionServicio d
My Exception:
java.lang.IllegalStateException: No data type for node: org.hibernate.hql.ast.tree.MethodNode \-[METHOD_CALL] MethodNode: '(' +-[METHOD_NAME] IdentNode: 'extractValue' {originalText=extractValue} \-[EXPR_LIST] SqlNode: 'exprList' +-[DOT] DotNode: 'documentac0_.ATRIBUTOS' {propertyName=atributos,dereferenceType=4,propertyPath=atributos,path=d.atributos,tableAlias=documentac0_,className=es.abertis.iu.entity.DocumentacionServicio,classAlias=d} | +-[ALIAS_REF] IdentNode: '(documentac0_.ES_T1, documentac0_.ID_DOCUMENTACION_SERVICIO)' {alias=d, className=es.abertis.iu.entity.DocumentacionServicio, tableAlias=documentac0_} | \-[IDENT] IdentNode: 'atributos' {originalText=atributos} \-[QUOTED_STRING] LiteralNode: ''/atributos/atributo[@id=\"52\"]/@valor''
Where is the problem?
Thanks Dave
|