Pass around identifiers then. A Proxy is no lighter than a real instance of
an entity.

Marco Pivetta

http://twitter.com/Ocramius

http://ocramius.github.com/


On Fri, Jul 25, 2014 at 4:24 AM, Bui Trung Tan <[email protected]>
wrote:

> Sometimes I just need an object to pass through the system. At the end
> point, that object (Proxy object) will be loaded (with lazy-load) and do
> some works.
> So I don't want to send a heavy object through the system, just a Proxy
> Object is enough.
>
> I'd tried using query with partial, but it return an entity, and this
> entity cannot use lazy-load to fetch its properties (when its properties
> isnot another entities, such as string, int, datetime...).
>
> On Thursday, July 24, 2014 6:15:14 PM UTC+7, Jàπ (Jasper N. Brouwer) wrote:
>
>> Why do you want an array of proxies (in stead of real entities) when
>> performing such a query?
>>
>> --
>> Jasper N. Brouwer
>> (@jaspernbrouwer)
>>
>>
>> On 24 July 2014 at 12:35:17, Marco Pivetta ([email protected]) wrote:
>> > That's a decision that is up to the orm, not you. There is no explicit
>> way
>> > to force proxy retrieval.
>> > On 24 Jul 2014 12:32, "Bui Trung Tan" wrote:
>> >
>> > > Hi everyone,
>> > >
>> > > When we get result by *$entity_manager->createQuery('select a FROM
>> > > MyEntity a')->getResult()* , it returns an array of MyEntity
>> elements.
>> > >
>> > > How can I get an array of Proxy (of MyEntity) elements as return?
>> > >
>> > > Thanks!
>>
>>
>>  --
> 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.
>

-- 
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.

Reply via email to