aspose file tools*
The moose likes Object Relational Mapping and the fly likes OpenJPA _ findByExample with Like and Case Insensitive Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "OpenJPA _ findByExample with Like and Case Insensitive " Watch "OpenJPA _ findByExample with Like and Case Insensitive " New topic
Author

OpenJPA _ findByExample with Like and Case Insensitive

Niall Loughnane
Ranch Hand

Joined: Dec 07, 2006
Posts: 203
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://aspose.com/file-tools
 
subject: OpenJPA _ findByExample with Like and Case Insensitive
 
Similar Threads
J2EE - Entity & Entity Listeners usage
About Named Queries
Web Services
persistence.xml file for MS SQL Server 2000
Native Queries