Converting boolean into char equivalent?

herondale

Using FormGroup, when you check/uncheck a checkbox in the form, the value is stored as either true or false in the form object. However, in the database, what I need is either 'y' or 'n'.

Is it more appropriate to do the conversion in the server? Or the client?

eniacAvenger

Your client code should not be concerned with how the data is stored in the database, so it would be more appropriate to deal with the data conversion on the server, most likely in a data mapper that is called by your server controller.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related