Re: [Hibernate] Re: Polymorphic queries, where and order by

2004-10-02 Thread Andrei Sereda
- From: William Draï <[EMAIL PROTECTED]> Date: Wed, 29 Sep 2004 15:48:57 +0200 Subject: Re: [Hibernate] Re: Polymorphic queries, where and order by To: [EMAIL PROTECTED] Cc: Andrei Sereda <[EMAIL PROTECTED]> This is the second option I mentioned. By doing this I won't ge

Re: [Hibernate] Re: Polymorphic queries, where and order by

2004-09-29 Thread William Draï
This is the second option I mentioned. By doing this I won't get elements of class A (assuming these elements are considered having field2 = null). It would probably be clearer with a UI example : The user gets this table : Class      field1              field2 A            Paris A           

[Hibernate] Re: Polymorphic queries, where and order by

2004-09-29 Thread Andrei Sereda
Why don't you make "from B b order by b.field2" ? > > Let's say we have the following (simplified) mapping : > > > > > > > > > > Now we can execute any HQL query on the class A using the field1, for > example > "from A a where a.field1 like 'anything%'" or "from A a orde