-
Notifications
You must be signed in to change notification settings - Fork 248
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
Add possibility to create Stock and Source with predefined identifier #79
Conversation
|
…ifier -- fix static tests
…ifier -- fix static tests
@@ -17,6 +17,11 @@ | |||
*/ | |||
class Source extends AbstractDb | |||
{ | |||
/** | |||
* Provide possibility of save entity with predefined id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
of saving
use Magento\Framework\Model\AbstractModel; | ||
|
||
/** | ||
* Provide possibility of save entity with predefined id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Provides ... of saving predefined/pre-generated
|
||
/** | ||
* Provide possibility of save entity with predefined id | ||
* Use trait instead of extending for better reusability, also we don'nt want to hardcode hierarchy of inheritance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The choice to use trait instead of inheritance was made to prevent the introduction of new layer super type on the module basis as well as better code reusability, as potentially current trait not coupled to Inventory module and other modules could re-use this approach.
trait PredefinedId | ||
{ | ||
/** | ||
* Check if object is new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overwrite default AbstractModel implementation of the function isObjectNew
@see origina
adding the possibility to check whether (record) already exists in DataBase or not
@@ -13,6 +13,11 @@ | |||
*/ | |||
class Stock extends AbstractDb | |||
{ | |||
/** | |||
* Provide possibility of save entity with predefined id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Provides
…ifier -- update DocBlocks
27ac9f7
to
e4b3593
Compare
MC-40568: Stabilize MFTF tests (Inventory)
Internal build:
https://bamboo.corp.magento.com/browse/M2-AT2484