View Datatypes Bug

Hi, I think I've found a bug in how Radzen handles datatypes in views. So I built a view based on a number of tables, then I realized that one of the columns in the original table wasn't the correct size, (I changed it from tinyint to smallint). However, Radzen didn't recognize the change in the datatype in the related view and so kept referring to it as a tinyint/byte which caused cast errors when trying to display the view. Let me know if you need more information.

After the change in your database you did infer schema right?

I'm pretty sure I did. But it was late last night. It was only after I went into the data layer that I saw that the field was still being referenced as a byte in the view instead of a short which the source column had been changed to. I'll keep an eye out on this as I'm sure there'll be more instances where I need to change the source column as I go along.

Just tested this and it worked for me. I've made database with two similar tables:

Here is the first version of the view:

And here is the second:

after infer and generate:

I'm not sure this matches what happened to me. It looks to me like you changed the actual table that the view is referencing, although you kept the column name the same. What I did was change the actual datatype of the column already referenced. So to use your example, setup the view with TableWithTinyInt, infer, then change the datatype of that column in TableWithTinyInt to a smallint and then infer again and see if it updates the view.

Here is the same with what you've described:

after column type change and infer:

PS: make sure you recreated your view.

Yeah I definitely didn't do that. I wouldn't have recreated my view. Right now I only have a few views so that could be possible. But if once I've built up my application with a larger number of views, that wouldn't be feasible. This isn't a major issue in that it shouldn't really happen all that often, and at least now I know how to correct it going forward.

If you do not recreate the view SQL Server sys.* tables will still report the old type. We cannot do anything from the Radzen side.