Hibernate Query with entity-name
问题 I am using a POJO to define two tables (Main and backup). Both XML Classes are refering to same Java Class. Reference : Mapping same POJO to more than one table in Hibernate XML mapping files <hibernate-mapping> <class name="com.mypackage.model.Table1" table="Table1" entity-name="Table1"> <id name="Id" type="java.lang.Long"> <column name="ID" /> <generator class="identity" /> </id> <property name="name" type="string"> <column name="NAME" length="20" /> </property> <property name="age" type=