-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Order By on Sub Objects using Criteria
PostPosted: Mon Jun 07, 2004 10:40 pm 
Newbie

Joined: Mon Jun 07, 2004 9:54 pm
Posts: 1
Hi all,

I am trying to perform an Order by using the Criteria API on sub Classes of the initial Class the Criteria was created on.

Code:
public List listApplicationLands(Long clasCaseKey) throws PersistenceLayerException {
        ClasCriteria criteria = null;
        try {

            criteria = createCriteria(ApplicationLand.class);
            criteria.addOrder(Order.desc("historySummary.created"));

        } catch (Exception e) {
            throw ExceptionUtil.createPersistenceLayerException(log, res,
                    "listApplicationLands",
                    "while listing the ApplicationLands", e);
        }

        return criteria.list();
    }



I have scanned the forums and it seems this is an issue in version 2.1.2, can anybody tell me if this functionality has made it into 2.1.4

Thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.