Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Is the use of @Column annotation as substitute of hibernate @Formula is possible? (hibernate formula)
icon3.gif  Is the use of @Column annotation as substitute of hibernate @Formula is possible? [message #933084] Thu, 04 October 2012 14:14 Go to previous message
Dariusz Skrudlik is currently offline Dariusz Skrudlik
Messages: 4
Registered: July 2009
Junior Member
I found that can use @Column annotation for execute subselect,
e.g


    private BigDecimal quantityOrders;

    @Column(name="(select 2 from dual) as quantityOrders",insertable = false, updatable = false)
    public BigDecimal getQuantityOrders() {
        return quantityOrders;
    }


I tested name with some select and all working. I can link to current table by name and all other in database. It is fantastic, but is it right ?

Where can I find any documentation for that ?

P.S.
In hibernate @Formula I can use 'this' for pointing current table, how do this here (it is important when define other alias e.g. when use CriteriaBuilder)







 
Read Message icon3.gif
Read Message
Read Message
Read Message
Previous Topic:@Id and @AttributeOverride
Next Topic:using eclipselink in Eclipse' Tomcat
Goto Forum:
  


Current Time: Sat May 25 20:22:05 EDT 2013

Powered by FUDForum. Page generated in 0.01718 seconds