|
| Re: Is the use of @Column annotation as substitute of hibernate @Formula is possible? [message #939166 is a reply to message #933084] |
Wed, 10 October 2012 09:39   |
James Sutherland Messages: 1844 Registered: July 2009 |
Senior Member |
|
|
EclipseLink does not currently have an equivalent to Hibernate's @Formula, please log a bug, and vote for it.
Setting the column name will work for simple queries, but not for complex queries.
The best solution is to create a view that adds the computed column to the table, and map the entity to the view.
You could also instead execute a named query for the value.
EclipseLink does have an @AttributeTransformer feature, that would allow you to execute a query for computed value.
James : Wiki : Book : Blog
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.10777 seconds