Vaadin 14 TreeGrid - In-memory data works, but database-backed does not

In my quest to get the Vaadin TreeGrid to work for me, I decided to go back to the basic Vaadin demo vaadin-grid-flow-parent found at The demo as-is works nicely. There’s very little that the developer has to do to make it all work. It’s obvious that the TreeGrid and supporting classes are able to “figure out” the data its working with.

The one thing to note however, is that the data structure that represents the tree is pre-populated and available as an in-memory object. Understandable considering that it’s a demo after all.

I copied the project and modified it so that the tree data is stored in a database and is NOT pre-populated. There is a separate project that takes the exact same data structure used in the original demo and persists it to an H2 database. I have verified via the H2 console that the data exists and that the entity-to-entity relationships are correct.

When this version is executed, the tree grid contains nothing, not even any root node(s). I do not understand why the original works with so little code, while the database-backed version does not work at all. What is the magic that I’m not seeing here?

I have all of these projects available on github at Look for projects test-tree-grid, which is the original (or very near to original), test-tree-grid-db, which is the database-backed version and test-tree-grid-db-persist, which is the persister project that commits the demo data structure to the database.

test-tree-grid and test-tree-grid-db are very similar.

I don’t understand why one works and the other does not. If anyone can shed some light on any of this, it would be much appreciated.