Record ⊡ Data Mapper ⊡ Unit of Work ⊡ Identity Map ⊡ Metadata Mapping ⊡ Foreign Key Mapping ⊡ Lazy Load ⊡ Single Table Inheritance ⊡ Repository ⊡ Model View Controller ⊡ Front Controller ⊡ Remote Facade ⊡ Service Layer ⊡ Data Transfer Object ⊡ Optimistic Offline Lock ⊡ Layer Supertype ⊡ Separated Interface ⊡ Value Object ⊡ etc...
// Executed SQL: SELECT FROM characters WHERE id = 1; $characters = $characterRepository->findByName(“Bob”); // Executed SQL: SELECT FROM characters WHERE name = ‘Bob’; $characters = $characterRepository->findAll(); // Executed SQL: SELECT FROM characters;
// Executed SQL: SELECT FROM characters WHERE id = 1; $character->gainExp(100); $em->flush(); // Executed SQL: UPDATE characters SET exp = 100 WHERE id = 1;
WHERE id = 1; $character1B = $characterRepository->find(1); // Executed SQL?: SELECT FROM characters WHERE id = 1; $character1A->gainExp(100); $character1B->gainExp(100); $em->flush(); // Executed SQL?: UPDATE characters SET exp = 100 WHERE id = 1; // Executed SQL?: UPDATE characters SET exp = 100 WHERE id = 1;