Is this possible to map a SQL Native query (instead of a table) with an Entity without annotations (using XML configuration)??
I know that i can make a View in the database and map this view as a workaround to this, but I try to avoid this solution because the Schema is automatically generated from the Entities model, and I would have to create the view manually afterwards.
I know also that with annotations there exist something like @SqlResultSetMapping, but I am not allowed to use annotations.
For mapping legacy tables on an entity using Hibernate you could use a DAO method like this one:
Meanwhile in mappings.hbm.xml:
Omitting spring context for brevity.
Does this help?