9 search results for UnitOfWork

Validating how Values Change

... with validation... but with the help of a special class from Doctrine called the UnitOfWork. Alrighty, let's whip up a test to shine a light on this pesky bug. Inside tests/Functional/, open UserResourceTest. Copy the ...

8:30
Wall Time Exclusive Time Other Wonders

... not very useful: the top item is where our script starts executing, the second is the next function call, and so on. Go back to exclusive. So apparently, the biggest problem, according to exclusive time, is this UnitOfWork ...

7:47
Simpler Validator for Checking State Change

... #[TreasuresAllowedOwnerChange]. In the last tutorial, we put this above that same $dragonTreasures property, but inside the User entity. The validator would loop over each DragonTreasure, use Doctrine's UnitOfWork to get the $originalOwnerId ...

7:23
The Patterns Behind Doctrine

... And that's no, no that's intentional because basically the EntityManager will pass its called to the UnitOfWork and the UnitOfWork will store all those things. So when we pass in the Order, the UnitOfWork will figure out ...

37:39
Running Code On Publish

... of DragonTreasure objects, loop over them, then use Doctrine's UnitOfWork to see what each DragonTreasure looked like when it was originally loaded from the database. Should we use that same trick here to see what the ...

6:05
Finding Issues via the Call Graph

There are two different ways to optimize any function: either optimize the code inside that function or you can try to call the function less times. In our case, we found that the most problematic function is UnitOfWork ...

6:50
Comparisons Validate Performance Changes Find Side Effects

... that this was a good change. Really, it's a huge win! On the call graph, in the darkest blue, the critical path this time is the path that improved the most. Click the UnitOfWork call now. Wow. The inclusive time is down ...

3:56
Profiling Command Line scripts

... optimize those queries if it can. But the big problem with our old code was something related to Doctrine's UnitOfWork::computeChangeSet(). Each time you call flush() in Doctrine, it looks at all the objects it has queried ...

6:33
The N+1 Problem EXTRA_LAZY

... homepage-original. Ok! 165 milliseconds! Let's view the call graph. Well... this looks familiar! We have the same number 1 exclusive-time function as before: UnitOfWork::createEntity(). In that situation, it meant that ...

5:59