You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/**
* This should be compulsory in the constructor in the future,
* but will have to be like this for BC until the next major version.
*
* @param Application $application
*
* @return $this
*/
public function setApplication(Application $application)
{
$this->_application = $application;
return $this;
}
You've suggested that this is BC in the next major version but I think, it's really not necessary thing and may become annoying, as long as you are not always in the possession of credentials, for example when you have cached Invoice payload locally and only want to manipulate it, change, and save locally again. Or when you want to compare incoming payload with that locally cached one - that's kind of situation when you don't want to be able to save that cached models by accident. Application is used only when model is saved (for example in Repository if u follow that kind of pattern). But when it's not, its redundant dependency. What I'd suggest is to remove completely application context from Remote/Model and use Application->save/savaAll instead as it is now.
I'm open for discussion.
The text was updated successfully, but these errors were encountered:
Hi, in regard to the comment in Remote/Model
You've suggested that this is BC in the next major version but I think, it's really not necessary thing and may become annoying, as long as you are not always in the possession of credentials, for example when you have cached Invoice payload locally and only want to manipulate it, change, and save locally again. Or when you want to compare incoming payload with that locally cached one - that's kind of situation when you don't want to be able to save that cached models by accident. Application is used only when model is saved (for example in Repository if u follow that kind of pattern). But when it's not, its redundant dependency. What I'd suggest is to remove completely application context from Remote/Model and use Application->save/savaAll instead as it is now.
I'm open for discussion.
The text was updated successfully, but these errors were encountered: