Skip to content

Commit 8bc2177

Browse files
akoclaude
andcommitted
fix: lower VIEW ENTITY version gate from 11.0+ to 10.18+
Now that the writer includes the inline Oql field for 10.x projects, VIEW ENTITY works on Mendix 10.18+ (when it was introduced). - Lower @Version gates in 01-domain-model-examples.mdl from 11.0+ to 10.18+ - Lower requireMinVersion in view entity mxcheck tests from 11.0 to 10.18 - Update version-compatibility docs to reflect working 10.x support Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e4bad71 commit 8bc2177

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

docs-site/src/appendixes/version-compatibility.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ These features use BSON structures that changed in Mendix 11.0 and are **not com
6363

6464
| Feature | Minimum Version | Error on 10.x |
6565
|---------|----------------|---------------|
66-
| View entities (CREATE VIEW ENTITY) | 11.0 | CE6775: "A view entity requires an OQL query" |
66+
| View entities (CREATE VIEW ENTITY) | 10.18 | Version-aware serialization (inline OQL on 10.x) |
6767
| Page parameters (Params: { ... }) | 11.0 | InvalidOperationException on 'Variable' property |
6868
| Design properties (Atlas v3) | 11.0 | CE6083: "Design property not supported by your theme" |
6969
| REST client (CREATE REST CLIENT) | 11.0 | BSON format incompatibility |
@@ -82,7 +82,7 @@ The Mendix metamodel evolves across versions. The reflection data shows ~42% typ
8282

8383
### View Entities (10.x vs 11.x)
8484

85-
View entities exist in both 10.18+ and 11.x, but the BSON structure differs. Mendix 10.x stores view entities without the OQL query field that 11.x requires. Writing a view entity with 11.x BSON to a 10.x project causes CE6775.
85+
View entities exist in both 10.18+ and 11.x, but the BSON structure differs. In Mendix 10.x, the `OqlViewEntitySource` object has an `Oql` field that stores the OQL query inline (in addition to the separate `ViewEntitySourceDocument`). Mendix 11.0 removed the inline `Oql` field. The writer detects the project version and includes the inline field for 10.x projects.
8686

8787
### Page Parameters (10.x vs 11.x)
8888

mdl-examples/doctype-tests/01-domain-model-examples.mdl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -699,9 +699,9 @@ TYPE ReferenceSet
699699
OWNER Both;
700700
/
701701

702-
-- @version: 11.0+
702+
-- @version: 10.18+
703703
-- ############################################################################
704-
-- PART 7: VIEW ENTITIES (OQL) — requires Mendix 11.0+
704+
-- PART 7: VIEW ENTITIES (OQL) — requires Mendix 10.18+
705705
-- ############################################################################
706706

707707
-- MARK: View Entities
@@ -1235,9 +1235,9 @@ CREATE OR MODIFY NON-PERSISTENT ENTITY DmTest.FilterParameters (
12351235
);
12361236
/
12371237

1238-
-- @version: 11.0+
1238+
-- @version: 10.18+
12391239
-- ============================================================================
1240-
-- Level 9.5: CREATE OR MODIFY for View Entity — requires Mendix 11.0+
1240+
-- Level 9.5: CREATE OR MODIFY for View Entity — requires Mendix 10.18+
12411241
-- ============================================================================
12421242
--
12431243
-- View entities can also use CREATE OR MODIFY to update their definition.
@@ -1453,9 +1453,9 @@ ALTER ENTITY DmTest.VATRate
14531453
ALTER ENTITY DmTest.VATRate
14541454
SET POSITION (300, 400);
14551455

1456-
-- @version: 11.0+
1456+
-- @version: 10.18+
14571457
-- ============================================================================
1458-
-- PART 11: COMPLEX VIEW ENTITIES WITH SUBQUERIES — requires Mendix 11.0+
1458+
-- PART 11: COMPLEX VIEW ENTITIES WITH SUBQUERIES — requires Mendix 10.18+
14591459
-- ============================================================================
14601460
-- Demonstrates advanced OQL features including:
14611461
-- - Inline subqueries (derived tables)

mdl/executor/roundtrip_mxcheck_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ func TestMxCheck_ViewEntitySimple(t *testing.T) {
629629

630630
env := setupTestEnv(t)
631631
defer env.teardown()
632-
env.requireMinVersion(t, 11, 0) // VIEW ENTITY BSON format requires 11.0+
632+
env.requireMinVersion(t, 10, 18) // VIEW ENTITY requires 10.18+
633633

634634
mod := testModule
635635

@@ -684,7 +684,7 @@ func TestMxCheck_ViewEntityWithAggregates(t *testing.T) {
684684

685685
env := setupTestEnv(t)
686686
defer env.teardown()
687-
env.requireMinVersion(t, 11, 0) // VIEW ENTITY BSON format requires 11.0+
687+
env.requireMinVersion(t, 10, 18) // VIEW ENTITY requires 10.18+
688688

689689
mod := testModule
690690

0 commit comments

Comments
 (0)