You cannot do that. Java is strongly typed: all objects must be exactly the type they are declared to be, including all fields. Values in those fields may be optional, though.
There are alternatives:
- Use "select new Person(id, name) from ...", though this is HQL, not SQL. You'll also have to write the correct constructor for Person, obviously.
- Use plain old HQL, and don't use fetch join: hibernate will create a proxy object and not load the PersonAddress.
Hibernate's main job is to do what you're trying to do here. You've chosen to not reinvent the wheel by having hibernate do all the grunt work for you, but here you are, reinventing the wheel. Don't try to optimize hibernate in this way: it's already optimal. If you really, really want to be this explicit about everything, you're better off dropping hibernate and doing it all manually.