This content has been marked as final.
Show 2 replies
-
1. Re: Seam 2.2.2.Final new operator in EJBQL
petrussello Jul 13, 2012 7:04 AM (in response to diegogusava)Hi Diego,
if you use JPA as persistence provider you have to simply write your EJBQL query like this:
select p from Prest p
to select a Prest entity from your DB, if Prest is really the name of the java class annotated with @Entity.
The new operator isn't a right EJBQL operator.
-
2. Re: Seam 2.2.2.Final new operator in EJBQL
diegogusava Jul 13, 2012 8:17 AM (in response to diegogusava)I have resolved this already
I change the subject pattern
from this
private static final Pattern SUBJECT_PATTERN = Pattern.compile("^select\\s+(\\w+(?:\\s*\\.\\s*\\w+)*?)(?:\\s*,\\s*(\\w+(?:\\s*\\.\\s*\\w+)*?))*?\\s+from", Pattern.CASE_INSENSITIVE);
to this
private static final Pattern SUBJECT_PATTERN =Pattern.compile("[^.*]from\\s+[\\.\\w]+\\s+(\\w+)[^.*]?",Pattern.CASE_INSENSITIVE);
now .. I can use the "new" operator.
Thanks