This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

OpenJPA _ findByExample with Like and Case Insensitive

 
Niall Loughnane
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic