Search This Blog

Sunday, March 14, 2010

Optional parameters with named query in Hibernate?

Programmer Question

Is there any way to specify optional parameters (such as when search parameters are provided from a form and not all parameters are required) in a named query when using Hibernate? I'm using a native SQL query, but the question is probably applicable to named HQL queries as well.



I'm pretty sure the answer to this is 'no', but I haven't find the definitive answer in the documentation yet.



Find the answer here

No comments:

Post a Comment

Related Posts with Thumbnails