Having the follow basic tables (one-to-many relationship)
Client - Has many users.
Users - Each user belongs to single client.
In a very simple exampl
As far as I know, you can't do this, because ClientID is not a property of User. User has a property like $client, and that client entity has an $id.
This is confusing you because you're dealing with Entites but you're still thinking in SQL.
The solution, though slightly less efficient, would probably be to join the Client entity into your DQL query, and then get $results[N]['client']['id']
(or similar, I'm not too familiar with getResultArray())
Try to set the HINT_INCLUDE_META_COLUMNS
query hint on the query (not the builder) before you execute it.
$q->setHint(Query::HINT_INCLUDE_META_COLUMNS, true);