I appreciate if you can help me with this problem...
I have 2 tables: people and address, they are linked via a foreign key, say user_id, for a given user, it could have multiple addresses (rows) returned, so I'd like to sort the address search result in descending order based on the column "last_update_timestamp" in the Address table if all the rows are populated with values; If one or more addresses(rows) are null, then I want to put them at the bottom of the sorted result, Can somebody show me how to do this in HQL?
I know in SQL I could use something similar to:
ORDER BY last_update_timestamp IS NULL ASC, last_update_timestamp DESC....
Thanks.
|