From 05b7f2c28b2b2fbc9247618e5f4b0586cf7caed4 Mon Sep 17 00:00:00 2001 From: Diogo Peralta Cordeiro Date: Wed, 23 Feb 2022 17:02:41 +0000 Subject: [PATCH] [CORE][DB] Remove doc from deprecated DB::merge and add about DB::refresh --- src/Core/DB/DB.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/Core/DB/DB.php b/src/Core/DB/DB.php index ab3d710501..680070d630 100644 --- a/src/Core/DB/DB.php +++ b/src/Core/DB/DB.php @@ -53,20 +53,21 @@ use Functional as F; * @template T of Entity * * // Finds an Entity by its identifier. You probably want to use DB::findBy instead + * * @method static ?T find(string $class, array $values) - * // Special cases: It's like find but does not load the object if it has not been loaded yet, it only returns a proxy to the object. (https://www.doctrine-project.org/projects/doctrine-orm/en/2.10/reference/unitofwork.html) + * // Special cases: It's like find but does not load the object if it has not been loaded yet, it only returns a proxy to the object. (https://www.doctrine-project.org/projects/doctrine-orm/en/2.10/reference/unitofwork.html) * @method static ?T getReference(string $class, array $values) - * // Removes an entity instance. + * // Removes an entity instance. * @method static void remove(object $entity) - * // Merges the state of a detached entity into the persistence context - * @method static T merge(object $entity) - * // Tells the EntityManager to make an instance managed and persistent. + * // Refreshes the persistent state of a managed entity, i.e., overriding any local changes + * @method static void refresh(object $entity) + * // Tells the EntityManager to make an instance managed and persistent. * @method static void persist(object $entity) - * // Determines whether an entity instance is managed in this EntityManager. + * // Determines whether an entity instance is managed in this EntityManager. * @method static bool contains(object $entity) - * // Flushes the in-memory state of persisted objects to the database. + * // Flushes the in-memory state of persisted objects to the database. * @method static void flush() - * // Executes a function in a transaction. Warning: suppresses exceptions. Returns the result of the callable. + * // Executes a function in a transaction. Warning: suppresses exceptions. Returns the result of the callable. * @method mixed wrapInTransaction(callable $func) */ class DB