The cookbook (https://book.cakephp.org/bake/1.x/en/usage.html) seems to be rather short about ‘bake’.
Can’t get clear how some things (have to) work ( Bake not generating 100% new model-files? ).
Googling around found you can use an additional parameter to set display-field,
‘cake bake model Performers --display-field performer’.
I guess there’s more to know about ‘bake’, but where can I find that info. Did a lot of googling in trying to find out, but with no success. Last resort would be reading the code, but I’m afraid that won’t help me either.
in terminal you can use
--help for i think all commands i.e
$ bin/cake bake model --help
Bake table and entity classes.
cake bake model [subcommand] [options] [<name>]
all Bake all model files with associations and validation.
To see help on a subcommand use `cake bake model [subcommand] --help`
--connection, -c The datasource connection to get data from.
--display-field The displayField if you would like to choose one.
--fields A comma separated list of fields to make
--force, -f Force overwriting existing files without
--help, -h Display this help.
--hidden A comma separated list of fields to hide.
--no-associations Disable generating associations.
--no-entity Disable generating an entity class.
--no-fields Disable generating accessible fields in the
--no-fixture Do not generate a test fixture skeleton.
--no-hidden Disable generating hidden fields in the entity.
--no-rules Disable generating a rules checker.
--no-table Disable generating a table class.
--no-test Do not generate a test case skeleton.
--no-validation Disable generating validation rules.
--plugin, -p Plugin to bake into.
--primary-key The primary key if you would like to manually set
one. Can be a comma separated list if you are
using a composite primary key.
--quiet, -q Enable quiet output.
--table The table name to use if you have
non-conventional table names.
--theme, -t The theme to use when baking code.
--verbose, -v Enable verbose output.
name Name of the model to bake (without the Table suffix). You can use
Plugin.name to bake plugin models. (optional)
Omitting all arguments and options will list the table names you can
generate models for
Thanks, that’s the info I was looking for.
Did use cake -h and cake bake -h, now I’m just wondering why it didn’t occur to me to check the next level.