As far as I know Doctrine cannot hydrate multiple types of entities in 1 resultset, other than what you are experiencing (have 1 entity-type as root, and the other associated in partial collections).
You could use array- or scalar hydration, which will give you a more uniform result-set, but no entities. I suggest you experiment with: - performing 2 queries and mixing the result manually. - use NativeQuery with a UNION clause, but there are some limitations to that approach (see your SQL vendor's docs). -- Jasper N. Brouwer (@jaspernbrouwer) On 7 October 2014 at 17:15:07, Thomas Baumann ([email protected]) wrote: > > On Tuesday, October 7, 2014 5:10:55 PM UTC+2, Sebastian Krebs wrote: > > > > You should be able to get the tokens via User::getTokens() already, right? > > Yes, we get a partially filled persistence collection that is filled with > that one token. But we really would like to have it in the result set. I > remember I did it somehow. Unfortunately that was over a year ago, so I > cannot remember it anymore in particular. -- You received this message because you are subscribed to the Google Groups "doctrine-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/doctrine-user. For more options, visit https://groups.google.com/d/optout.
