JPQL queries on Virtual Access Method fields [message #1061731] |
Mon, 03 June 2013 11:50  |
Eclipse User |
|
|
|
I was wondering if its possible to write JPQL queries against fields that are defined as Virtual? If so, whats the syntax?
For example:
@VirtualAccessMethods(get = "getFlexField", set = "setFlexField")
class SomeEntity{
Map<String,Object> flexFields;
Object getFlexField(String field);
void setFlexField(String field, Object value);
}
if i have the following dynamically defined:
<entity class="SomeEntity">
<attributes>
<basic name="FLEX_1" attribute-type="java.lang.Double" access="VIRTUAL">
<column name="FLEX_1"/>
</basic>
</attributes>
</entity>
Can I write a JPQL query that will load all 'SomeEntity' objects where FLEX_1 is some value?
"SELECT e FROM SomeEntity e WHERE e.FLEX_1 = 3"
(syntax is bogus but something like this)
|
|
|
|
Powered by
FUDForum. Page generated in 0.03979 seconds