Automatically truncate entity fields

By Carlos Sousa on 16 Mar
Each time create a record in an entity with some text fields it may happen that the size of the database field is not enough for the data I want to put in.

I know I should do that validation, otherwise I'll get error:

"String or binary data would be truncated. The statement has been terminated."

It would be nice if the entity had an option for automatically truncate text fields avoid those errors.
Maybe it would be useful, if you specify somehow in the data model, that you want that behaviour for a specific field, otherwise would be very awkward behaviour to be a default for the platform.

Not for the default.

It's preciselly that. A field configuration for truncating.

Use case: logging stack traces and error messages. :)