Open hfloyd opened 3 years ago
Yes, the PropertyValueConverter does seem to be recognized when rendering the values, but somehow it's not recognised by ModelsBuilder when generating the models. I'll do some debugging to see why that might be.
The issue was that the GetPropertyValueType
function of the PropertyValueConverter was using the wrong parameter type and not calling the correct type property of the wrapped data type property.
This has now been fixed in v2.0.5 which has been released on NuGet and Our.
Hi @tomvanenckevort , I think something related to the version is missing in the Our package - when I attempted to install it over the 2.0.4 version, I got "Package is already installed" message:
I was able to successfully install the last one as an update over the 2.0.3 version.
...
I was able to install it via NuGet, but when I Build Models, it is still coming through as an "object".
I forgot to update the version number of the new Our package. That has now been updated to the correct v2.0.5 on Our.
I'll reopen the issue and test the new version again here locally. It was working fine for me this morning, but I realise that was not through the API version you mentioned.
I've retested this locally with the ModelsBuilder API mode and it generates the model with the correct type for me:
So this is with:
The models were generated by adding a .mb
file to the solution, right-click it in VS and click Build Models.
Is that the same setup you are using?
Hi @tomvanenckevort , Yes, that is the way I was generating the Models... I needed to move the project along, so I manually fixed the property type via an addition to the model file, but I can comment it out and try again....
Hi @tomvanenckevort 👋🏻
I use the API version of ModelsBuilder (latest - "Umbraco.ModelsBuilder 8.1.6"), and noticed that a TextCount wrapped RTE property is returning data as "object":
In the interface for the composition:
In the class for a content type using that composition:
I see there is a PropertyValueConverter in the package, so I'm not sure why this is the result...