BUG: Computed columns in MySQL are not mapping properly to model data types.
Posted: Fri 20 Dec 2019 00:13
I have a column on a MySQL table that is an Int computed at the database as the sum of three other required fields. When generating the model from database that property is not placed on the autogenerated tag in the edml file. This causes an error when creating new entities and breaks on saveChanges(). I have to manually change the edml file by hand by adding this tag and then it works as expected. It seems that it is a bug that this tag is not staying. Also, upon bringing in other changes to the model this property is wiped and has to be added in manually every time.
This is the tag before (from devart autogeneration)
<Property Name="NumCycles" Type="int" />
This is the tag after I manually edit it:
<Property Name="NumCycles" Type="int" StoreGeneratedPattern="Computed" />
This is the tag before (from devart autogeneration)
<Property Name="NumCycles" Type="int" />
This is the tag after I manually edit it:
<Property Name="NumCycles" Type="int" StoreGeneratedPattern="Computed" />