We have moved to GitHub Issues
Created by Jan Højriis Dragsbæk 02 May 2013, 14:04:20 Updated by Morten Christensen 26 Jun 2013, 12:11:32
Relates to: U4-2167
Related to a earlier posted issue, the Save method does not seem to like to set properties explicitly.
More specifically, this means that if i have a true/false property on a document and I copy this, it it lost during the copy process. This has been an issue for the last year I have worked with Umbraco, but I have never been able to pinpoint exactly what happens.
This issue is heavily related to the ticket with the number U4-2167, as the same functionality seems to be lacking there too.
I have now been able to reproduce this issue (several times) on umbraco versions: 4.7.0 184.108.40.206 4.9.1 6.0.2 6.0.5 6.0.6
As far as I can tell this is only an issue for true/false values, and was due to the way properties was "transformed" prior to being saved to the database. True/False is saved as 1/0 in the Integer column and there was a check to see if the value of a Property (in the model) was different from Null before doing the transformation. If the Property value was null it would simply skip it and the value in the database would be Null. I have changed this so that it will be saved as false in the database if the Property value is null and a boolean. This does however not change a whole lot if the Property value is never touched, as this will leave the value as a null object. So I have added some extra checks for specific DataTypes, but this is not a good long term solution as it only recognizes the True/False datatype as a boolean datatype.
Assignee: Morten Christensen
Backwards Compatible: True
Affected versions: 4.8.0, 4.9.0, 4.10.0, 4.11.0, 6.0.0, 4.9.1, 4.11.1, 4.11.2, 4.11.3, 4.11.4, 6.0.1, 4.11.5, 6.0.2, 4.11.6, 6.0.3, 4.11.7, 4.11.9
Due in version: 6.0.7