This question is locked. New answers and comments are not allowed.
Hi,
I have a problem with the data access designer configuration for a readonly triggered column.
I tried to set column property "kind" like "Calculated" but when I tried to save a record of this table, the value changed anyway.
After that, I tried to change, in Model Operation settings, the value of "IsBackendCalculated" to true but, again, when I saved the value changed anyway.
After, I tried to set column property "kind" like "PersistentReadOnly" but when I tried to save I have this exception:
"An exception of type 'Telerik.OpenAccess.Exceptions.InvalidOperationException' occurred in Telerik.OpenAccess.Runtime.dll but was not handled in user code
Additional information: The update of field 'CentralScada.DAL.OpenAccess.DomainModels.Equipment._isMonitored' is not allowed."
Have you got some advices for me? I use the database first approach.
Thank you.
I have a problem with the data access designer configuration for a readonly triggered column.
I tried to set column property "kind" like "Calculated" but when I tried to save a record of this table, the value changed anyway.
After that, I tried to change, in Model Operation settings, the value of "IsBackendCalculated" to true but, again, when I saved the value changed anyway.
After, I tried to set column property "kind" like "PersistentReadOnly" but when I tried to save I have this exception:
"An exception of type 'Telerik.OpenAccess.Exceptions.InvalidOperationException' occurred in Telerik.OpenAccess.Runtime.dll but was not handled in user code
Additional information: The update of field 'CentralScada.DAL.OpenAccess.DomainModels.Equipment._isMonitored' is not allowed."
Have you got some advices for me? I use the database first approach.
Thank you.
5 Answers, 1 is accepted
0
Hello Stefano,
If you want to specify a column as ReadOnly you should only change the value of the "kind" property to persistent read-only. The "IsBackendCalculated" property is to specify if the column is Primary Key and it is Auto Incremental.
Could you revert all the changes you apply on the property and only set the "kind" property value to true. This should fix the issue.
I hope that helps.
Regards,
Boris Georgiev
Telerik
If you want to specify a column as ReadOnly you should only change the value of the "kind" property to persistent read-only. The "IsBackendCalculated" property is to specify if the column is Primary Key and it is Auto Incremental.
Could you revert all the changes you apply on the property and only set the "kind" property value to true. This should fix the issue.
I hope that helps.
Regards,
Boris Georgiev
Telerik
OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
0
Stefano
Top achievements
Rank 1
answered on 28 Jan 2015, 03:51 PM
Hello Boris,
thanks for your reply but I've just tried this solution (revert all changes and set "kind" property to "PersistentReadOnly") and I have the error that I've copied in the first post.
Before, I forgot to write that I'm creating a web application(MVC) and the problem occurs when I try to attach the class.
Thanks again,
Stef.
thanks for your reply but I've just tried this solution (revert all changes and set "kind" property to "PersistentReadOnly") and I have the error that I've copied in the first post.
Before, I forgot to write that I'm creating a web application(MVC) and the problem occurs when I try to attach the class.
Thanks again,
Stef.
0
Hi Stefano,
From the provided information it appears that in your controller method you attach an entity in order to update it. Unfortunately the issue that you are experiencing is caused by a known bug on our side that concerns attaching entities for update that have contain PersistentReadOnly properties.
For the time being, you could manually update entities which contain PersistentReadOnly properties. You could do that by getting the object that needs updating from the database by its primary key available in the DTO and then manually synchronize the properties of this entity.
If you need any further assistance, please let us know.
Regards,
Boyan
Telerik
From the provided information it appears that in your controller method you attach an entity in order to update it. Unfortunately the issue that you are experiencing is caused by a known bug on our side that concerns attaching entities for update that have contain PersistentReadOnly properties.
For the time being, you could manually update entities which contain PersistentReadOnly properties. You could do that by getting the object that needs updating from the database by its primary key available in the DTO and then manually synchronize the properties of this entity.
If you need any further assistance, please let us know.
Regards,
Boyan
Telerik
OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
0
George
Top achievements
Rank 1
answered on 21 Mar 2016, 06:18 PM
Was this ever corrected in a Release for Data Access?
0
Hi George,
Let me confirm that the latest release of Data Access - the Q1 2016 version, does not contain a fix for this issue. I'll make sure to update this thread ones the problem is resolved.
Thank you for your patience and understanding.
Regards,
Doroteya
Telerik
Let me confirm that the latest release of Data Access - the Q1 2016 version, does not contain a fix for this issue. I'll make sure to update this thread ones the problem is resolved.
Thank you for your patience and understanding.
Regards,
Doroteya
Telerik
Check out the latest announcement about Telerik Data Access vNext as a powerful framework able to solve core development problems.