Skip to content

Commit 225e81f

Browse files
author
Oleksii Korshenko
authoredJul 11, 2017
Merge pull request #1313 from magento-engcom/2.1-develop-prs
Public Pull Requests #10211
2 parents 8a43b91 + a4c38ee commit 225e81f

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed
 

‎lib/internal/Magento/Framework/Model/AbstractModel.php

+9-3
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,9 @@ public function getCollection()
523523
* @param integer $modelId
524524
* @param null|string $field
525525
* @return $this
526-
* @deprecated
526+
* @deprecated because entities must not be responsible for their own loading.
527+
* Service contracts should persist entities. Use resource model "load" or collections to implement
528+
* service contract model loading operations.
527529
*/
528530
public function load($modelId, $field = null)
529531
{
@@ -624,7 +626,9 @@ public function setHasDataChanges($flag)
624626
*
625627
* @return $this
626628
* @throws \Exception
627-
* @deprecated
629+
* @deprecated because entities must not be responsible for their own persistence.
630+
* Service contracts should persist entities. Use resource model "save" to implement
631+
* service contract persistence operations.
628632
*/
629633
public function save()
630634
{
@@ -809,7 +813,9 @@ public function afterSave()
809813
*
810814
* @return $this
811815
* @throws \Exception
812-
* @deprecated
816+
* @deprecated because entities must not be responsible for their own deletion.
817+
* Service contracts should delete entities. Use resource model "delete" method to implement
818+
* service contract persistence operations.
813819
*/
814820
public function delete()
815821
{

0 commit comments

Comments
 (0)