Skip to content

Add clarification about deprecated methods in Abstract model #10211

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 11, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions lib/internal/Magento/Framework/Model/AbstractModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,9 @@ public function getCollection()
* @param integer $modelId
* @param null|string $field
* @return $this
* @deprecated
* @deprecated because entities must not be responsible for their own loading.
* Service contracts should persist entities. Use resource model "load" or collections to implement
* service contract model loading operations.
*/
public function load($modelId, $field = null)
{
Expand Down Expand Up @@ -624,7 +626,9 @@ public function setHasDataChanges($flag)
*
* @return $this
* @throws \Exception
* @deprecated
* @deprecated because entities must not be responsible for their own persistence.
* Service contracts should persist entities. Use resource model "save" to implement
* service contract persistence operations.
*/
public function save()
{
Expand Down Expand Up @@ -809,7 +813,9 @@ public function afterSave()
*
* @return $this
* @throws \Exception
* @deprecated
* @deprecated because entities must not be responsible for their own deletion.
* Service contracts should delete entities. Use resource model "delete" method to implement
* service contract persistence operations.
*/
public function delete()
{
Expand Down