How to set metamodel version of working copy in Mendix SDK on creating new app?

0
Hi all, I cannot set the version of the metamodel when I create a new app with Mendix SDK. I want to set the version to be 6.7.0. Thanks
asked
3 answers
1

When creating a new project via the Mendix SDK, the (meta) model version is set to the latest modeler version.

This can not be downgraded to an older version.

 

But there is another way to create an app in a specific version.

1. Create a new Team Server based App in the specific Mendix Modeler (e.g. 6.7.0)

2. Instead of creating a new project in your SDK script, load this existing project in the SDK script.

answered
1

Please be aware that changing the metamodel version numbers  does not change the model itself.  

The only real way to change is to upgrade the app itself to the higher model version first. in that case the metamodel version AND the model itself are consistently migrated to that specific version.

The error you posted is a warning that you tried executing a function that is not yet available for your model version you have at hand.

 

 

 

answered
0

Arjan, the version used for execution of your script is 6.0.0. In your cloud you see 7.9 but this is not the version used during execution when you create a new app.  Try adding in your script a Json Structure and you will see:

 Type 'JsonStructures$JsonElement' is not yet available in Mendix version 6.0.0. It was introduced in Mendix version 6.6.0
    at LifeCycle.reportVersionIssues (C:\Users\pavel\........

Also if you display the version in console:

console.log( workingCopy.model().metaModelVersion) 

you will see 6.0.0.

 

To update an app is not a option for me, as a solution works, but I cannot take advantage of it.

answered