[hibernate-dev] [Search] The case against searching with Criteria + restrictions
Guillaume Smet
guillaume.smet at gmail.com
Fri Mar 21 07:50:10 EDT 2014
Hi Hardy,
On Fri, Mar 21, 2014 at 12:14 PM, Hardy Ferentschik <hardy at hibernate.org> wrote:
> I am even wondering whether we should not go a step further and disallow
> the use of Criterias altogether in FullTextSessionImpl by throwing an exception
> in case of its use. We then can add an explicit method to FullTextSession which
> allows just the setting of the fetch type for a given association of an entity.
> Under the hood it can still use the Criteria, but it will prevent the unsupported use
> of Criteria queries.
Thanks for your feedback.
As for me, I think generalizing what is done in
FullTextQueryImpl.getResultSize() when isSizeSafe() is false might be
sufficient for the moment.
I don't use this option though so I don't know exactly why it's used
and if being able to set a Criteria query might be useful.
--
Guillaume
More information about the hibernate-dev
mailing list