Hi Jakob,

Here is the sql:
SQL: SELECT 
A0.variableCreateDate,A0.variableId,A0.variableName,A0.variableCreator,A0.variableType 
FROM Variable A0 ORDER BY 3
SQL: SELECT 
A0.variableId,A0.groupCreateDate,A0.groupVariableOrder,A0.packageId,A0.groupCreator,A0.groupId,A0.criteria,A0.criteriaDescription,A0.groupVariableValue,A0.groupName
 FROM WorkstationGroup A0 WHERE A0.variableId =  ?  ORDER BY 6

I have seen that in the "while" statement the order is correct.

Maybe the problem is the HashMap??

Thanks
Sylvain

-----Message d'origine-----
De: Jakob Braeuchi [mailto:[EMAIL PROTECTED]
Date: samedi, 15. mars 2003 11:58
�: OJB Users List
Objet: Re: orderBy criteria in getIteratorByQuery


hi silvain,

could you please post the sql ?
if Variable.class has extents each extents is sorted separately. it's 
not possible to do sort ing over all extents.

jakob

[EMAIL PROTECTED] wrote:

>Hi Jakob,
>
>Yes, I have seen the doc.
>
>But the code below doesn't work for me:
>
>----code----
>Criteria crit = new Criteria();
>crit.addOrderByAscending("variableName");
>
>Query query = new QueryByCriteria(Variable.class, crit);
>
>Iterator iter = broker.getIteratorByQuery(query);
>
>HashMap variables = new HashMap();
>
>while (iter.hasNext()) {
>  Variable var = (Variable) iter.next();
>  variables.put(var.getVariableName(), var.getVariableName());
>}
>----code----
>
>The variableNames are not ordered.
>
>Do you know what is the problem?
>
>Thanks
>Sylvain
>
>
>
>-----Message d'origine-----
>De: Jakob Braeuchi [mailto:[EMAIL PROTECTED]
>Date: vendredi, 14. mars 2003 17:27
>�: OJB Users List
>Objet: Re: orderBy criteria in getIteratorByQuery
>
>
>hi silvain,
>
>yes it is possible and it's in the docs.
>please have a look at query.html included in the distribution.
>
>jakob
>
>[EMAIL PROTECTED] wrote:
>
>  
>
>>Hello,
>>
>>Is it possible to have an "orderBy" criteria if you call a getIteratorByQuery()?
>>
>>Thanks
>>Sylvain
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>> 
>>
>>    
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to