Hi is there any simple way how to deal with default value for create CRUD template in Play?
(for example value of integer different from default 0)
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There was a bug raised regarding this in one of the google group threads. It was suggested the best way was to rely on the default constructor to specfiy the default values for fields.
I have tested this, and it works fine. My test was to create a simple Model class, setting a default value for one of the fields, and then using the default CRUD settings.
If I go to the CRUD screen, the age shows as 18.