I want get old entity from database for save history changed.
Now i have a code:
// Old version 1!
$app = $appManager->findByAppleId(547409501);
$app->setVersion('1.1');
$oldApp = $appManager->findByAppleId(547409501);
print $app->getVersion() . '<br />' . $oldApp->getVersion();
But app and old app have version 1.1. In DB app have version 1
P.S.
->findByAppleId – get repository and use function “find” (Apple ID is primary key)
This problem solution:
Code: