Question: what is the difference between @entity and @table in hibernate?
Answer: a unique constraint bound to a single column, refer to @Column). Entity is object-oriented and table is relation-oriented. You can only use the entity name in the HQL (Hibernate Query Language) to query objects, and the table name in the native SQL.