|JPQL queries on Virtual Access Method fields [message #1061731]
||Mon, 03 June 2013 11:50
| John Dugo
Registered: October 2011
I was wondering if its possible to write JPQL queries against fields that are defined as Virtual? If so, whats the syntax?|
@VirtualAccessMethods(get = "getFlexField", set = "setFlexField")
Object getFlexField(String field);
void setFlexField(String field, Object value);
if i have the following dynamically defined:
<basic name="FLEX_1" attribute-type="java.lang.Double" access="VIRTUAL">
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.02139 seconds