Bug 308450 - EclipseLink doesn't provide support for EXTRACT and EXTRACTVALUE with namespaces
Summary: EclipseLink doesn't provide support for EXTRACT and EXTRACTVALUE with namespaces
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-08 05:15 EDT by Steven Hale CLA
Modified: 2022-06-09 10:09 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Hale CLA 2010-04-08 05:15:55 EDT
Build Identifier: 

There is only a org.eclipse.persistence.expressions.Expression.extract(String xpath) method which means that queries with namespaces eg extract("'//dataformat/@foo:id'") cannot be used. 

There are a number of workarounds including including getFunctionWithArguments() but for convenience the following methods could be added to Expression:
org.eclipse.persistence.expressions.Expression.extract(String xpath, Vector namespaces)
org.eclipse.persistence.expressions.Expression.extractValue(String xpath, Vector namespaces)




Reproducible: Always

Steps to Reproduce:
1. Create query using namespace in xpath
2. execute query
3. result - ORA-31011
Comment 1 Gordon Yorke CLA 2010-04-08 08:07:41 EDT
This appears to be a MOXy issue.
Comment 2 David Twelves CLA 2010-04-08 09:18:31 EDT
Discussed this with the MOXy team - this looks to be more an ORM bug as it concerns database queries/expressions (albeit on XmlType data in the D/B).  James provided a workaround, which Steven indicates in his comment.

>EclipseLink only currently provides support for EXTRACT 
>without the namespace argument.
>As a workaround you can either define your own operator, or use the
>getFunction() API, or use custom SQL.
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:09:55 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink