Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Use Transformer attribute fields in JPQL query

See,
http://www.eclipse.org/forums/index.php?t=msg&th=153787&start=0&S=447935042985eaada8fa991e8e95ca66


jandam wrote:
> 
> Please can you help me.
> 
> I have "Param" object with read+write transformer. And I want to map
> "Columns" to "attributes" because I want to sort/select "Items" according
> to Column "FREQ", "TYPE", ...
> 
> JPQL query: "select o from Items as o order by o.param.freq"
> 
> ...
> class Items {
> ...
>     @ReadTransformer(transformerClass = Param.class)
>     @WriteTransformers({
>             @WriteTransformer(transformerClass = ParamType.class, column =
> @Column(name = "TYPE")),
>             @WriteTransformer(transformerClass = ParamDouble.class, column
> = @Column(name = "FREQ", precision = 8, scale = 0)),
>             @WriteTransformer(transformerClass = ParamDouble.class, column
> = @Column(name = "FREQ_LO_LIMIT", precision = 8, scale = 0)),
>             @WriteTransformer(transformerClass = ParamDouble.class, column
> = @Column(name = "FREQ_HI_LIMIT", precision = 8, scale = 0))
>     })
>     private Param param;
> 
> ...
> }
> 
>   Thank you very much.
>       Martin
> 
> 


-----
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-Transformer-attribute-fields-in-JPQL-query-tp25328578p25388228.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top