Changes to behaviour of adding Entities to an Aggregate

By Kilian Hekhuis on 17 Feb

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.)

Also, allow Copy & Paste of Filters between aggregates.