-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
I am discovering Yancy by following http://preaction.me/article/yancy-todo to build my application.
Perl 5.36.1
If I try to disable the editing of the integer 'id' field in a database table 'users', with the 'readOnly' flag:
plugin Yancy => {
backend => { mysql => app->mariadb },
route => '/admin',
read_schema => 1,
schema => {
users => {
title => 'Users',
properties => {
id => {
type => 'integer',
readOnly => 1
}
},
},
},
};
Mojolicious throws this error:
Can't load application from file \
"/path/to/app.pl": /definitions/users/properties/id/readOnly: Expected boolean \
- got number.Compilation failed in require at (eval 76) line 1.
I can't for the life of me figure out why, since Perl considers 1 as true and all the examples I've found on-line, including the manpage docs use readOnly => 1. Removing that line, resolves the error.
Any ideas?
Metadata
Metadata
Assignees
Labels
No labels