Create default child entities when creating an entity

Is there a way to create a or a couple of child entities when creating a new entity?

Lets have a manifest:
Entity-type: project
Children: Entity-Type A, Entity-Type B

When creating a new entity of entity type Project:
also create 1 child of entity type A and 2 of type B.

Is that possible? Manifest only shows the default entities when clearing the database/starting a new one.

Hi Johan,

I think this question is the same as previously asked in this topic

If i understand your question correct and that topic does indeed deal with the same situation than you can find your answer there: no, it’s not possible to automatically create children when creating an entity in the gui using the +, but there might be a nice workaround available as described in that issue.

Hope that answers your question.


Hi Johan,

I think in the end in my case the workaround was indeed that I used default values. So you still can manually click (+) to create the entity B (filled with defaults) if you want to, and otherwise I would use the defaults directly from the code.

In a current project I am considering keeping A and B in the same entity. And then using pages to “separate them” visually. In that case it looks like you have two entities with their own separated views, just under different tabs at the top.This allows a visually separated editor, but still everything is created at once. The downside is that this means a bit more book-keeping for the developer to make sure the right views only visible under the right page.

Thanks, both seem like an option. For now I will stay with the way it is now. Manually press the plus button to add a new entity and warn the user if none exists.

1 Like