In some cases I've seen that it would be very convenient to have access to model information from an expression. All this already is accessible from the com.mendix.systemwideinterfaces.core.meta package of the server API and from the mendix/lib/MxMetaObject class in the client API, but is not directly usable from the modeler. I guess you could name my idea 'static model reflection' and partly see it as an addition to the MxModelReflection module for the cases you don't need to store this persistently. In the examples below I'm using the fictive '~' prefix to illustrate how this could look like.
Examples:
~name - available from any item like a microflow, an enity, an attribute, etc.
~moduleName - available from any item
~isSpecialization - available from object ($myObject~isSpecialization)
~isPersistable - available from object ($myObject~isPersistable)
Also, it would be great to have access to your model through non-persistent entities in the System module (or a seperate one). Again, in addition to the persistent MxModelReflection.
Thanks for your comments Pim and Ryan! Glad to hear you appreciate the idea.
It would be so great to be able to catch certain edge cases like this at compile / build time. It’s on our backlog to utilize the Model SDK to catch DeepLink issues with constants that drift over-time, but it would be great to avoid doing all of that work and catching it right in the modeler.
The Mendix platform is very powerful, but it feels so strange to have to embed values in constants that should just be identifiable by the modeler itself. That and having to generate / sync reflection at runtime feel like pretty large workarounds.
Almost 2 years ago but I still miss this feature in the platform. I think is so easy to implement with for example:
$NewCustomer/metamodel/CustomerName
Also for better validation possibilities would be awesome to pass names of attributes and associations to for example a java-action.
so if there can be a function in Microflow expressions like getName(<object> or <object/attribute> or <object/association>) like it's also available for enums with GetCaption(<enum>)
After another year of developing, I still would like to see this implemented in a future Mendix Studio version.
Things I wouldn't have to do anymore:
Thanks for the use case examples, Fabian!
Other cases could be:
Nice idea, some use cases from me (which mainly avoid issues from refactoring and simplify the use of model reflection)
Interesting! Can you provide some use cases?