vaadin / docs

Official documentation for Vaadin and Hilla.
https://vaadin.com/docs
Other
29 stars 190 forks source link

Document how to work with related entities in Hilla #1982

Open marcushellberg opened 1 year ago

marcushellberg commented 1 year ago

This is a challenge that users run into quite quickly when building an app with Hilla. We should have a guide for how to do it.

cromoteca commented 1 year ago

@marcushellberg can you add some details about what you would like to see here? There's nothing special about related entities in Hilla, so that would rather be a JPA guide. It basically resorts to use the good Jackson annotations to filter data sent to the client, if I understood your demand.

marcushellberg commented 1 year ago

What I was referring to was how to work with them in forms. Should you send over all the entities to the client, update them and send them back to the server? Should you have DTOs that refer to IDs instead of the actual objects etc.

As a concrete example, maybe you can show how to implement a form for creating and updating Orders.