mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DQL: large data set and deep nested object #5156
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ajax13 on GitHub (Jun 17, 2016).
Originally assigned to: @Ocramius on GitHub.
Hello every one,
I have a DQL query for deeply nested object with a large data set, the query takes a lot to be executed.
So I wonder of there is a way to define the value of max deep level (of nested attributes) to be searched/returned?
Thx!
@lcobucci commented on GitHub (Jun 17, 2016):
Do you really need to load all those objects? Can't you just use sql?
@ajax13 commented on GitHub (Jun 17, 2016):
I want to deal with Objects :/
@lcobucci commented on GitHub (Jun 17, 2016):
But you can deal with objects by using the native query api and just loading the objects you need...
What are you building that you need to load that large dataset?
@ajax13 commented on GitHub (Jun 17, 2016):
If I do like you said, it will cost me the I/O Database Server time(for every object I need), besides every object I load contains many nested other attributes(objects).
And yes I have a large dataset, but I Think the problem is with the nested Objects :/
@lcobucci commented on GitHub (Jun 17, 2016):
Sorry I don't follow... You mapped a lot of nested objects in doctrine, asks for them be loaded eagerly and you want doctrine to limit the loading of the objects.
It sounds like a modelling issue or maybe that you want to use objects to do a database work.
@lcobucci commented on GitHub (Jun 17, 2016):
Could you provide a gist with your mapping and the dql you're using so we could help you better?
@ajax13 commented on GitHub (Jun 17, 2016):
Thank you very much , actually I find the too nested entity that causes this issue. I am going to eliminate it from my entity I am not racking my brains anymore!
Unfortunately, there is not a function to specify a maximum level for DQL :S
@Ocramius commented on GitHub (Jun 18, 2016):
Closing here: this is a question for the mailing list or stackoverflow, not an issue to be reported, sorry.