ordering a selectQuery by ID DESC

From: stefan.leidne..udor.lu
Date: Mon Aug 01 2005 - 10:45:26 EDT

  • Next message: Andrus Adamchik: "Re: ordering a selectQuery by ID DESC"

    hello,

    i try to execute a SelectQuery wich results i want to be in the
    descending order according to the ID of my object

    DataContext ctx= CayenneMappingFactory.getInstance().getDataContext();
    SelectQuery query=new SelectQuery(Referentiel.class);
    query.setDistinct(false);
    query.addOrdering(new Ordering(Referentiel.ID_REFERENTIEL_PK_COLUMN,
    Ordering.DESC));
    List list=ctx.performQuery(query);

    it works perfectly on all attributes but not on the ID_PK

    have someone an idea ?

    thanks



    This archive was generated by hypermail 2.0.0 : Mon Aug 01 2005 - 10:45:28 EDT