Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Use of ColumnResult eclipselink oracle

If you just want the value back, you do not need a sqlresultsetmapping or
columnresult, you can just execute a native query with the SQL, and it will
return the value.

@ColumnResult is for if you want to get back entities and raw data from a
native query.  If you just want data, then don't use a sqlresultsetmapping,
if you just want objects, then you need to use an @EntityResult and a
@FieldResult.



sampillay wrote:
> 
> Hi,
> I want to use ColumnResult to return a calculated value from a
> sqlresultsetmapping. 
> So my sql looks like   :: Select  1*2 as TEMP   from <table> .
> 
> How do I declare TEMP in my entity class.
> 
> Do you have an example of using columnresult.  
> 


-----
---
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland 
http://www.eclipse.org/eclipselink/
 EclipseLink ,  http://www.oracle.com/technology/products/ias/toplink/
TopLink 
Wiki:  http://wiki.eclipse.org/EclipseLink EclipseLink , 
http://wiki.oracle.com/page/TopLink TopLink 
Forums:  http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink , 
http://www.nabble.com/EclipseLink-f26430.html EclipseLink 
Book:  http://en.wikibooks.org/wiki/Java_Persistence Java Persistence 
-- 
View this message in context: http://www.nabble.com/Use-of-ColumnResult-eclipselink-oracle-tp21748802p21792167.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top