-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Query problem with Xpath
PostPosted: Fri Oct 02, 2009 8:42 am 
Newbie

Joined: Fri Oct 02, 2009 8:31 am
Posts: 1
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.