Allow the namespace alias to be used in query builder

Allow namespace aliases (e.g. FoobarBundle:Bar) to be used
in the query builder.

Fixes #407