Closed Hologos closed 6 years ago
Generally, no ORM is suitable for loading 30 000 entities, it's a bad idea. If you need somehow iterate over all entities, you should do a batch loading with clearing the model (Model::clear()).
To the current issue: it's probably caused by PHP's memory limit. Try inverstigate if there is a message in outputted code, also if it's ok if you increase the limit.
Next, is this a common webpage or CLI script?
I increased the number of entities loaded and you are indeed correct - it's a memory limit issue. I can see the message now on screen. It somehow died in Tracy and didn't report any message.
I missed the chapter about clearing the model. I will redo the service method, it's supposed to be a cli script.
Maybe this should be somehow fixed - disabling Nette tracy panel in CLI. Will check, reopening for that.
Closing since it may be a convenient to have bluescreen from CLI with the debugging info.
Hi,
Tracy DebugBar dissapears if I retrieve data from a relationship. Table sets has ~200 records, table cards has ~30 000 records (some have 300 cards paired to them, some 50). I think it's caused by Nextras\Dbal query panel. I am using "nextras/orm": "3.0.@beta", "nextras/dbal": "3.0.@rc", "tracy/tracy": "~2.4".
Entities definition
Sample code