File tree 1 file changed +9
-3
lines changed
lib/internal/Magento/Framework/Model
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -523,7 +523,9 @@ public function getCollection()
523
523
* @param integer $modelId
524
524
* @param null|string $field
525
525
* @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.
527
529
*/
528
530
public function load ($ modelId , $ field = null )
529
531
{
@@ -624,7 +626,9 @@ public function setHasDataChanges($flag)
624
626
*
625
627
* @return $this
626
628
* @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.
628
632
*/
629
633
public function save ()
630
634
{
@@ -809,7 +813,9 @@ public function afterSave()
809
813
*
810
814
* @return $this
811
815
* @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.
813
819
*/
814
820
public function delete ()
815
821
{
You can’t perform that action at this time.
0 commit comments