Well, I came up with a kludge that gets around the problem. I simply rewrite
the query that is created by the SearchCondition and run in a new Query.
Here is my code:

SearchCondition<Patient> sc = searchContext.getCondition(expression,
Patient.class);
                                        
                JPATypedQueryVisitor<Patient> visitor = new
JPATypedQueryVisitor<Patient>(service.getEm(), Patient.class);          
                
                sc.accept(visitor);
                
                TypedQuery<Patient> typedQuery = visitor.getQuery();
                
                String q1 = typedQuery.toString().replace('*', 'p') + " ESCAPE 
'\'";
                                
                Query query = service.getEm().createQuery(q1);
                                
                List<Patient> patients = query.getResultList();

Now, when I call my Resful service like so:

/patients/search/lastname==Jones

I get the results without error.

I don't think this will work for all FIQL query strings, but it's a start.



--
View this message in context: 
http://cxf.547215.n5.nabble.com/FIQL-error-unterminated-quoted-string-at-or-near-tp5733495p5733648.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to