Adds define()
method to ModelFactory
#5897
Merged
define()
method to ModelFactory
#5897