|
This is not a bug. HQL is an OO query language. You've queried the
superclass, not the subclass. It seems pretty natural to me that you
can't order by a subclass attribute. What you want and the patch provided does work only in particular cases. "from java.lang.Object o order by o.publicPrice" cannot be done in SQL since java.lang.Object has to be queried in several SQL SELECTs I recommend you order at the Java level 2.1 is *not* abandonned. We are actively providing bug fixes and support of the 2.1 family. We are working very hard on H3 to provide tons of new features, you can understand we cannot backport and keep several branch of code in a feature working process. Spring integration of H3 should be pretty straightforward (import update net.sf.hibernate -> org.hibernate) That's basically all you need (maybe check for HibernateException since it moved to the RuntimeException hierarchy). March, Andres wrote: Well, couldn't it be reclassified as a bug fix? Not being able to navigate associations because of a hard coded "this" in the construction of the order by seems like something many people would face. I could be wrong.Anyway this patch has been around a long time and as far as I can tell was submitted properly. More importantly H3 is not even released and support for it in Spring is even farther off. Any reason 2.1 is being abandoned so soon? I'm not asking for another 2.1 release. I don't see the harm in applying it to 2.1 CVS head but maybe I'm short-sighted.-----Original Message----- From: Emmanuel Bernard [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 29, 2004 12:59 PM To: March, Andres Cc: William Draï; Emmanuel Bernard; [EMAIL PROTECTED] Subject: Re: [Hibernate] Polymorphic queries, where and order by Sorry, no new feature will be added to the 2.1 branch. March, Andres wrote:We can't use H3 unfortunately because we do not have enough time to add H3 support to Spring. Is there any way this patch can be applied to H2? ------------------------------------------------------------------------ *From:* William Draï [mailto:[EMAIL PROTECTED]] *Sent:* Wednesday, September 29, 2004 11:22 AM *To:* Emmanuel Bernard *Cc:* March, Andres; [EMAIL PROTECTED] *Subject:* Re: [Hibernate] Polymorphic queries, where and order by I haven't yet tested with H3. I think there were no change logs related to this. I will try as soon as I have enough time. We can live without this "feature" for a few more weeks. Thank you for your anwser. Speaking from memory, Gavin did implement something on the (now dead 2.2 branch). It now has been reporded on H3. Did you test it? I can remembe, he'd implemented the transparent subclassing (no special keyword). March, Andres wrote: I'm sorry if I expand the subject a little. We pulled a patch off the -- Emmanuel Bernard [EMAIL PROTECTED] http://www.hibernate.org |
- [Hibernate] Polymorphic queries, where and order by William Draï
- RE: [Hibernate] Polymorphic queries, where and order... March, Andres
- Re: [Hibernate] Polymorphic queries, where and o... Emmanuel Bernard
- Re: [Hibernate] Polymorphic queries, where a... William Draï
- RE: [Hibernate] Polymorphic queries, where and order... March, Andres
- RE: [Hibernate] Polymorphic queries, where and order... March, Andres
- RE: [Hibernate] Polymorphic queries, where and order... March, Andres
- Re: [Hibernate] Polymorphic queries, where and o... Emmanuel Bernard
- RE: [Hibernate] Polymorphic queries, where and order... March, Andres
- Re: [Hibernate] Polymorphic queries, where and o... Emmanuel Bernard
