You can use DISTINCT in HQL or an ResultTransFormer (Criteria.DISTINCT_ROOT_ENTITY) in HQL to get no duplicates if an join involved.

Greetings,
Luca

Simon Kitching schrieb:
On an almost-off-topic subject: I've always found Hibernate's maxResult
facility to be quite useless. It limits the number of *SQL ROWS*
returned, not the number of *objects*. Therefore when table joins are
involved (and they often are) then the actual number of *objects* that
will be returned can be significantly different from the maxResult
setting.

Have other people had this problem, and if so is there a known solution?

Cheers,
Simon

On Sun, 2009-01-18 at 17:07 +0000, Cagatay Civici wrote:
This is not a UI thing and I think should be handled at data access
rather than UI level.

Hibernate api supports maxResult so you can limit the number of rows
returned.

On Sun, Jan 18, 2009 at 4:57 PM, bansi <[email protected]> wrote:
We use JSF 1.2, RichFaces 3.1, Spring 2.5, Hibernate 3.2 and
        have following
        requirement
"The maximum number of rows returned must be configurable so
        that users
        don't query too much information."
We are able to successfully implement search using RichFaces
        walk method of
        Serializable data model which provides dataScroller for
        pagination
Any pointers/suggestions will be greatly appreciated


Reply via email to