Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Active Objects - Operator IN with Criteria collection

Vincent Thoulé
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 7, 2014

Hi All,

I need to perform an ActiveObject query based on the operator IN using a collection of Criteria Value.

I found a post about the usage of IN : http://stackoverflow.com/questions/16581656/how-to-create-active-object-in-condition-query

But is it possible to have something like

public Collection<MyEntity> getMyEntities(Collection<Integer> _anyIds) {
    MyEntity[] entities = ao.find(MyEntity.class, Query.select().where(" ANY_ID IN (?)", anyIds));
    if (entities  == null) {
        return null;
    }
    return newArrayList(entities);
}


Thanks

Vincent

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Remo Siegwart
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 7, 2014
Vincent Thoulé
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 7, 2014

Thanks for sharing it.

TAGS
AUG Leaders

Atlassian Community Events