Skip to content

Instantly share code, notes, and snippets.

@Kaspiman
Last active November 12, 2020 10:53
Show Gist options
  • Save Kaspiman/efbd2945206fa230ad5faaff39cbe3a8 to your computer and use it in GitHub Desktop.
Save Kaspiman/efbd2945206fa230ad5faaff39cbe3a8 to your computer and use it in GitHub Desktop.
<?php
$bankRequest = $this->bankRequestEntityRepository->find(177);
$bankRequest->setCreatedAt(new \DateTime());
$this->entityManager->persist($bankRequest);
$this->entityManager->flush();
$data = $this->bankRequestEntityRepository->find(177);
?>
Логи запросов Postgres без повторного SELECT
postgres_1 | LOG: statement: SET NAMES 'UTF8'
postgres_1 | LOG: execute <unnamed>: SELECT t0.id AS id_1, t0.data AS data_2, t0.deleted_at AS deleted_at_3, t0.created_at AS created_at_4, t0.updated_at AS updated_at_5, t0.credit_id AS credit_id_6, t0.bank_id AS bank_id_7, t0.author_id AS author_id_8, t9.id AS id_10, t9.data AS data_11, t9.created_at AS created_at_12, t9.updated_at AS updated_at_13, t9.insurance_company_id AS insurance_company_id_14, t9.valuation_company_id AS valuation_company_id_15, t9.bank_request_id AS bank_request_id_16, t17.id AS id_18, t17.data AS data_19, t17.created_at AS created_at_20, t17.updated_at AS updated_at_21, t17.bank_request_id AS bank_request_id_22, t23.id AS id_24, t23.data AS data_25, t23.bank_request_id AS bank_request_id_26 FROM bank_requests t0 LEFT JOIN realty t9 ON t9.bank_request_id = t0.id LEFT JOIN bank_offer t17 ON t17.bank_request_id = t0.id LEFT JOIN deals t23 ON t23.bank_request_id = t0.id WHERE t0.id = $1 AND ((t0.deleted_at IS NULL))
postgres_1 | DETAIL: parameters: $1 = '177'
postgres_1 | LOG: statement: BEGIN
postgres_1 | LOG: execute <unnamed>: UPDATE bank_requests SET created_at = $1, updated_at = $2 WHERE id = $3
postgres_1 | DETAIL: parameters: $1 = '2020-11-12 10:52:27+00', $2 = '2020-11-12 10:52:27+00', $3 = '177'
postgres_1 | LOG: statement: COMMIT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment