Hibernate createNativeQuery - get more than one Entity

Hi, I am using following code to execute native SQL query with hibernate:

    Query zonesQuery = session.createNativeQuery(
        "Select * \n" +
           "FROM dbo.Structure AS S\n" +
           "JOIN dbo.StructureLocationType AS SLT ON SLT.StructureId = S.Id\n" +
           "WHERE SLT.LocationTypeId = :lc").addEntity(StructureEntity.class);

zonesQuery.setParameter("lc", locationTypeID);
List<StructureEntity> zones = zonesQuery.list();

So it works and it gets me list of StructureEntity

now, because my sql query “join” from StructureLocationType table, is there possibility to get whole StructureLocationType row as well, still using single query or Crtieria builder maybe?

Thank you.

Yes, just use addEntity for the child entity. Check out this article for a complete solution about how to set the child entities into the parent as well.