ElementQuery generation based on annotation attributes