I have Customer and Order enties, like in the tutorial.
When I open the Customer edit mask I see all related Orders.
Now I do a right click in the Order list and select ‘create’.
The Order edit mask pops up.
Now I could select the Customer for which I want to create a new order.
But, I would like to get this preselected based on the Customer I am coming from.
Setting the entity association to “composition“ does not change neccessary the way the tables are setup. It depends on how you already structured your entities.
That said, imho you’ll have a hard time letting the datamodel be defined outside of your control. When working with ORMs and especially with these full stack frameworks like CUBA is, they are making certain assumptions or have conventions that best practices but not neccessary exactly what your ‘db apartment’ would do.
The reason is that the entities and how they are layed out is the center of CUBA. A lot of stuff is built on top of that. One example is how the screen generation and default behavior of screens works.
So if you give that out of the developers control and the db model is not setup as cubas default, you will miss a lot of convinience that you would otherwise have. Im not saying it is not possile, cuba can handle different db schema settings, but it is far from optimal imho.