- primarily fixed instantiation with Default Attribute values with
the QDateTime
- revisited ctors and instance methods
- added instanceHeap methods, create model instance on the heap
- added instance method overloads with the connection override param.
- added tests for all these new and old methods and ctor-s
- used Model::instance() related methods all over the TinyORM to
correctly support Model instantiation with Default Attribute values
with the QDateTime
- added a new Model constructor with the DontFillDefaultAttributes tag
that instantiates a Model class without fill default attributes, to
bypass CRTP problem with the QDateTime; this ctor is called from
the instance()-related methods and the fill() method is called on
already instantiated Model
methods
- updated NOTES.txt where the raw Model ctor-s were called
The db:seed command invokes the root seeder DatabaseSeeder which can
invoke another seeders using the call() related methods. The root seeder
can be set by the --class command-line option and also by the --seeder
cmd. line option on some other commands like migrate:fresh/refresh.
Seeders can be passed to the Tom application in the similar way like the
migrations using the TomApplication::seeders<>() method or through the
constructor.
Arguments can be passed to the call<>() method, then the seeders run()
method will not be called using the virtual dispatch but using the type
traits. Of course the arguments passed to the call<>() method has to
match with the run() method parameters.
Others:
- unified usingConnection() across all commands, this functionality was
extracted to own class, previous it was a part of the Migrator class,
so now every command even if it doesn't use Migrator can call
the usingConnection() and it correctly sets a default connection and
SQL queries debugging on the base of the -vvv command-line argument
- a default database connection is now required, if not set then
the exception will be thrown
- added example seeders to the Tom application
Migration classes can be named in two formats, CamelCase without the
datetime prefix and snake_case with the datetime prefix.
If the CamelCase name is used then the T_MIGRATION macro has to be
also used in the migration class.
- also added a new validations of the migration class names