AND and OR in same query

How can i specify a query which captures this relation: username=X and (objectid=Y OR objectid=Z)



query.condition = ???

Ok, it seems that you can use the same syntax? Also is there a restriction on the amount of OR/ANDs or query condition length?

Yes, you can use AND and OR just like you said, and there’s no limit on their amount.