Skip to main content



      Home
Home » Eclipse Projects » EclipseLink » query-by-example and trim?(how to trim for example query?)
query-by-example and trim? [message #641025] Tue, 23 November 2010 18:18 Go to next message
Eclipse UserFriend
I have a db field (varchar) that may or may not contain leading and trailing spaces.
I would like to use query-by-example using this field as part of the object's example criteria but I need some way to tell the example to trim the field. A simple sql query would use: trim(name) = 'bob'

Is there any way to configure the query by example to do this? Maybe using some flavor of QueryByExamplePolicy?

As always, thanks in advance.
Tony
Re: query-by-example and trim? [message #641471 is a reply to message #641025] Thu, 25 November 2010 10:32 Go to previous message
Eclipse UserFriend
Query by example is for simple queries. You will need to use JPQL, Criteria, or Expressions.
Previous Topic:MySQL: update on self-referencing foreign key tables leads to Duplicate Key Exception
Next Topic:reading new primary key of inserted object
Goto Forum:
  


Current Time: Fri Jul 18 15:34:04 EDT 2025

Powered by FUDForum. Page generated in 0.29356 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top