Last update: Download PDF Edit


This release introduces a number of breaking changes in the SDK’s API, so because of semantic versioning we need to up the major version.

story# impact description
612773 High The mechanics of model elements being contained has been reworked: see below for more details.
634662 Low The toPlainJson method on elements and units has been renamed to toJSON, because e.g. the Chrome Developer Tools understand this to produce nice, human-readably representations of such objects. Rename all usages of toPlainJson to toJSON to fix your code.
639825 Low Broken by-name references are automatically fixed when a target is added to the model again.
637545 None Minor internal modifications for upcoming Mendix version 6.3.0.
633932 None Added support for long-lived working copies (that are not deleted after 24 hours) to SDK. Note that this is currently not available to non-trusted backends!
620108 None Removed exported interface IObservable from an internal namespace and replaced its use by the one from the MObservable library.
631960 None Added support for checking deployment status.
623906 None Added support for deploying from the SDK. Note that this is currently not supported on non-trusted backends!

The following breaking changes are made per 612773 and as a result of new insights on interference between containment and versioning/history of the Mendix modelling language. This interference leads to elements having different kinds of containment throughout their history. In turn, this necessitated us to make some fundamental changes to avoid having to have breaking changes in the future.

  • The container property is not strictly typed anymore; e.g., domainmodels.Attribute.container is not of type Entity anymore but of a general Container type.
  • Instead, containerAs<T> properties of type T are introduced on all elements. This property returns the instance of T which contains the element or throws if it’s not contained by an instance of T. To avoid those exceptions, use container together with instanceof-guards.
  • In case an element is contained by multiple properties (i.e., more than 1), createIn<T>Under<P> methods are generated which creates a new element in a given instance of T under property P. Several previously-existing createIn methods have been replaced by a createIn<T>Under<P> method, where these createIn methods considered only 1 containing property.
  • Elements that are contained by one property in at least one version will have a createIn method that works as expected for those versions and throws for other versions.
  • Elements that are always (i.e., in all versions) contained by properties that are derived, will not have any createIn... methods.

Dependent code can be easily fixed by using the containerAs<T> property instead of the container property, and (in a few specific cases) by using a createIn<T>Under<P> method instead of the createIn method.