[jboss-user] [JBoss Seam] - Optional Fields In Query

jrumskas do-not-reply at jboss.com
Tue May 1 11:50:32 EDT 2007


Hi,
I am pretty new to Seam and Hibernate and have a question. When using the EJB3.0 EntityManager, whats the best way to eliminate optional inputs from the query before it executes. For instance, if i have a screen with 5 input fields on it, of which any of them can be left blank and should not show up in the query where clause. Is there functionality for doing this in Seam/EJB3? or does the query have to be built by concatenation each time a call is made based on what fields are sent in from the screen?
If there is a simple solution, a code example would be helpful if possible.
Keep in mind that some fields are integers in the database and some are chars.
Thanks

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4042138#4042138

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4042138



More information about the jboss-user mailing list