HQL with fully qualified class name

后端 未结 3 1035
轮回少年
轮回少年 2021-01-20 10:30

Let\'s say I have entity Foo like -

package com.some.company.model;
// imports
@Entity
public class Foo{
    @Id
    private Long id;    

    // getters / s         


        
3条回答
  •  一整个雨季
    2021-01-20 11:04

    There is no point to use the fully qualified name because Hibernate won't allow duplicate entity names. So if you had different entities with the same name, in different packages. Hibernate will throw a DuplicateMappingException.

提交回复
热议问题