I'd like to be able to use the dot notation to get from one entity to another.
Let's say I have a table Users
:
id username acronym
-----------------------
1 john NASA
And a table Institutions
:
id instname acronym
---------------------------
9 Natl. Air... NASA
For historical reasons, the Users table does not contain a reference to the Institution id, but the acronym is unique.
Is there any possibility to dot my way from the entity for John to the name of NASA as in john.getInstitution().InstName()
? I'd like to avoid having to run a query through the entity manager.