Changes to behaviour of adding Entities to an Aggregate

Aggregates & Queries
On our radar

I'm often pretty annoyed by the way that Entities can be added to an aggregate (and not), and what gets automatically added. Here's some proposed changes to improve the functionality.

1) Allow adding the first entity by clicking a button, instead of forcing the user to drag and drop the entity from the data tab. If I wanted to drag/drop an entity, I would've drag/dropped it to the canvas in the first place so an aggregate would be auto-created. If I consciously first create an Aggregate by selecting it from the toolbar, please allow me to also add an Entity by clicking an add button. This is especially useful when having many entities (we have eSpaces that reference litterally dozens) and I want to search by name.

2) Adding an aggregate from the add button and by drag/dropping has different behaviour: adding by using the button only adds the selected entity, when drag/dropping all static entities with foreign keys in the dragged entity are also added. This is incosistent behaviour, and should be fixed. I propose to have a checkbox in the Select Source pop-up to add static entities, and shift-drag for adding using drag/drop without also adding static entities (i.e. dragging while pressing the Shift key; note it currently crashes Service Studio).

3) Service Studio automatically creates joins when a source is added. This is fine in most cases, but sometimes I really don't want it, since especially when having multiple sources it's sometimes unclear which joins have been added, and frankly often the joins are just wrong (especially with things like UserId). I would love to have a checkbox in the Select Source pop-up to disable auto-creating joins. We could also have Alt-Shift-drag to parallel it, but that might be to advanced for the average user.

4) I'd like to be able to add multiple sources at once. Currently, the Select Source pop-up doesn't allow multi-select, and also dragging multiple Entities at once doesn't work. For more complex queries, it's quite laborious having to add Entities one-by-one.

5) Allow drag/dropping the same entity more than once. It's possible (and rightly so) to add an Entitiy more than once using the Select Source pop-up, but not by dragging it from the Data tab. There's imho no good functional reason for this. (There's currently a funny little "feature" when drag/dropping an Entity that was first added via the pop-up, and that has an associated static entity: the cursor starts out as the two entities, then changes to only the static entity when hovering over the aggregate since the original Entity is not welcome.)

Created on 17 Feb 2017
Comments (6)


Also, allow Copy & Paste of Filters between aggregates.

Merged this idea with 'Stop dragging static entities along when adding an entity to an Aggregate' (created on 25 Jan 2019 11:41:36 by Ricardo Reis)

It's very annoying that every time I drag to an aggregate an entity with a foreign key to a static entity (SE) - even if it's not mandatory -  that static entity is dragged along with it.

Most of the times, I don't need to join the SE with the other entity, because I won't need to use any of its attributes, so I end up removing the SE and the automatically-created join. 

My suggestion is that the Platform should not try to guess that I will need to include the SE in the aggregate.

This comment was:
- originally posted on idea 'Stop dragging static entities along when adding an entity to an Aggregate' (created on 25 Jan 2019 by Ricardo Reis)
- merged to idea 'Changes to behaviour of adding Entities to an Aggregate' on 29 Jan 2019 09:37:33 by Kilian Hekhuis

Note that #1 has been solved for a while, but there's still room for improvement :).