I agree with the gentleman below, and I was vote #12. I did so right after I
saw the second post in this thread.

Let me start by saying that I am extremely happy with Hibernate and commend
you all for the great work you have done. My intention is not to complain
here, but just to understand the issue.

In this case, aren't there going to be other portions of the Criteria API
that are going to have to be deprecated as a result of "thinking on a better
API"? Maybe I am off-base here, but do you anticipate the existing API to
remain untouched? If it is going to change, then what would adding this
functionality hurt? I realize there are already exisitng patches out there
to add this functionality, but at this point I am uncomfortable with running
with my own patched version of Hibernate.

We all know this problem can be solved by writing a separate query that
implements a count, however this is completely duplicated code that can
contain relatively complex "throw-away" string handling logic. Avoiding this
is the reason I went witht the Criteria API to begin with. Given that I do
this in MANY places in my system, I have a LOT more code to write. I am sure
there are many more developers out there who would like to see this
functionality added now as paging is a very common requirement in web
applications.

I understand the desire to keep the interface for Criteria clean, and
avoiding deprecating functions in the API so are there any plans to have
this functionality developed in a future release? If I can plan for when
this will happen, I can anticipate how long I have to limp along with a
patch. However I would rather see a hard-line being taken on removing that
method as soon as there is a replacement set of functionality, rather than
forcing many developers to live with unsupported patches, until it is
implemented.

Thanks


> Last time I checked it was 12 votes and there already is a patch. ;)
> However, what's the point of using a patch that will be more of a
> problem to maintain and have to keep patching on each new version than
> a deprecated API?
>
> You may not want the API to go that way and that's fine, but it's been
> quite a while since requests started coming in for this kind of
> functionality and how it can be implemented or accomplished isn't
> nearly as important in my mind as whether or not it will be.
>
> If the team genuinely intends to eventually implement "something"
> whereby the effect of finding a count could be created then people can
> look at the road map and decide whether or not they can wait for it.
> But, the impression I get (especially from comments such as
> Christian's) is that it will never be possible to find out how many
> objects could be retrieved without actually retrieving them or writing
> a whole lot of "throw-away" code.
>
> What "really" sucks, is having to load 100 times as many objects as you
> wanted just to find out how many exist.  Even if you use "light-weight"
> objects this still sucks.
>
> My 2 cents.
>
> --- Emmanuel Bernard <[EMAIL PROTECTED]> wrote:
> >
> > > Christian Bauer wrote:
> > >
> > >> On 26 Feb (17:14), Fu Gui wrote:
> > >>
> > >>
> > >>
> > >>> Why do we not fix and close it?  Votes:11, it is a large number
> > in
> > >>> jira.
> > >>>
> > >>
> > >>
> > >> Because it sucks.
> > >>
> > >>
> > >>
> > > And in a more diplomatic way. We've the feeling this is not the way
> >
> > > the API should be. We're thinking on a better API. The worst
> > scenario
> > > would be to have to deprecate a sucking API becauseof not having
> > > take the time to think.
> > >
> > > Be patient, and enjoy the power of open source, you're 11 that need
> > > this feature right now, it'll be easy to work together and supply
> > > patch until we're ready :)
> > >
>
>
> __________________________________
> Do you Yahoo!?
> Get better spam protection with Yahoo! Mail.
> http://antispam.yahoo.com/tools
>
>
> -------------------------------------------------------
> SF.Net is sponsored by: Speed Start Your Linux Apps Now.
> Build and deploy apps & Web services for Linux with
> a free DVD software kit from IBM. Click Now!
> http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
> _______________________________________________
> hibernate-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/hibernate-devel



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to