Snippets and generalization

3
The snippets in Mx5 are a great addition to the platform. However, when using generalization, the snippet requires the specialized version. Using the general entitiy in your snippet will result in an error. In my opinion this should not happen. But before I file a bug report/feature request, I'd like to know your opinion. Cheers, Arjan
asked
3 answers
1

We implemented this in Mendix 5.2.0 which has been released today! There are some other snippet-related improvements as well.

Update: as pointed out in the comments the feature did not work in all cases and we had to disable it in 5.3.0. However, we managed to add it to 5.3.2 again and this time with support for the more complicated cases!

answered
1

Just to clarify your case:

  • You have an entity "Parent", and an entity "Child" which has Parent as a generalization.
  • You have a snippet which takes a Parent entity.
  • You want to use this snippet in a dataview which contains a Child object.

This gives an error in the modeler, but I agree that this should be possible. The snippet can only contain information present in the Parent, which must be present in the Child object in the dataview (since it's a specialization). I'd suggest to file a feature request for this.

answered
1

Am I mistaken, or is the problem introduced again in Mendix 5.3.1? It seems that we cannot use snippets with the Parent as dataview when showing it on a form with a Child dataview.

answered