Commit 57bfd90
fix(odata): skip primitive-collection NPEs on Mendix <11.0 (10.24 nightly)
`create external entities from <odata client>` bulk-imports an OData contract and,
for each Collection(Edm.X) property, creates a non-persistent entity backed by
Rest$ODataMappedPrimitiveCollectionValue / Rest$ODataPrimitiveCollectionEntitySource
(mirroring how Studio Pro handles e.g. TripPin Person.Emails). Those storage types
are a Mendix 11.0 feature and do not exist in the 10.x type cache, so writing them
made `mx check` on Mendix 10.24 abort the entire project load with:
Mendix.Modeler.Storage.Caches.TypeCacheUnknownTypeException: The type cache does
not contain a type with qualified name Rest$ODataMappedPrimitiveCollectionValue.
(The 10.24 nightly failed 10-odata-examples on both engines for this reason.)
Pre-11 Studio Pro simply omits OData primitive-collection properties when importing
an external entity, so mirror that: gate createPrimitiveCollectionNPEs behind
ProjectVersion().IsAtLeast(11, 0) and log a skip line on older projects. The rest
of the external entities still import normally, so 10.24 keeps its external-entity
coverage. On 11.x the NPEs are created exactly as before.
Verified with the doctype gate: 10-odata-examples now passes on Mendix 10.24
(both engines) and still passes on 11.12 (NPEs created).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent b258f48 commit 57bfd90
1 file changed
Lines changed: 17 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
685 | 685 | | |
686 | 686 | | |
687 | 687 | | |
688 | | - | |
689 | | - | |
690 | | - | |
691 | | - | |
692 | | - | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
693 | 705 | | |
694 | 706 | | |
695 | 707 | | |
| |||
0 commit comments