How to add new attribute in entity dynamically

-1
hello      I have a one entity and I want to add attributes in this entity dynamically as per requirements  is it possible , if possible then how to add attributes dynamically in entity
asked
3 answers
0

https://docs.mendix.com/apidocs-mxsdk/mxsdk/changing-things-in-the-model/

 

answered
0

No, that is not possible. To add columns to your tables you need to redeploy your model.

answered
0

It is not possible to add additional attributes to an entity at runtime. 

 

You could create an associated entity with two string attributes - key and value. You could then create instances of this object to store additional data in and just associate it with your parent object. 

 

Alternatively, if you don't want to do this at runtime, the Mendix SDK allows you to programmatically create entities and modify them. However, you would then need to deploy the resulting code for it to be usable.

https://docs.mendix.com/apidocs-mxsdk/mxsdk/changing-things-in-the-model/

 

Good luck!

answered