ordering and path expression

From: Arnaud Garcia (arnaud.garci..im.hcuge.ch)
Date: Wed Aug 31 2005 - 10:09:54 EDT

  • Next message: Nenko Ivanov: "Simple query Expression question"

    Hi,

    I would like to know how to use the ordering function with path
    expression in my queries.
    My objects are "Patient.class" with a list of "study.class" objects wich
    has a studydate getter (a simple one to many relationship)

    I want to retrieve my patients (by ID) with all the studies ordering by
    date (the date is a filed of Study.class),

    My code:
             Expression exp = ExpressionFactory.matchExp(patientid, "1234");
            query = new SelectQuery(Patient.class, exp);
            query.addPrefetch(studies);
            query.addOrdering(".....???...", true); // maybe something
    like: toPatient.study.studydate
            List patients = context.performQuery(query);

    many thanks for help

    arnaud



    This archive was generated by hypermail 2.0.0 : Wed Aug 31 2005 - 10:08:40 EDT