This week's book giveaway is in the
General Computing
forum.
We're giving away four copies of
Arduino in Action
and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See
this thread
for details.
A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
Arduino in Action
this week in the
General Computing
forum!
A special promo:
Enter your blog post or vote on a blogger to be featured in an upcoming Journal
JavaRanch
»
Java Forums
»
Databases
»
Object Relational Mapping
Author
OpenJPA _ findByExample with Like and Case Insensitive
Niall Loughnane
Ranch Hand
Joined: Dec 07, 2006
Posts: 201
posted
Jan 23, 2013 12:30:52
0
Hi,
I am querying a database using OpenJPA and passing in an object as the SQL where,
I am using this code to create the query
[code=java]
CriteriaQuery<Employee> q = cb.createQuery(Employee.class);
Employee example = new Employee();
example.setSalary(10000);
example.setRating(1);
q.where(cb.qbe(q.from(Employee.class), example);
[/code]
But how can I to do a LIKE and a case Insensitive query on this query?
Thanks in Advance,
Niall
I agree. Here's the link:
http://zeroturnaround.com/jrebel
- it saves me about five hours per week
subject: OpenJPA _ findByExample with Like and Case Insensitive
Similar Threads
Native Queries
About Named Queries
persistence.xml file for MS SQL Server 2000
J2EE - Entity & Entity Listeners usage
Web Services
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter