Class OverrideConfiguration.OverrideMappings

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.hibernate.cfg.Mappings

        org.hibernate.cfg.Mappings.PropertyReference
    • Constructor Summary

      Constructors 
      Constructor Description
      OverrideMappings()
      注册缺省的sequence生成器
    • Constructor Detail

      • OverrideMappings

        public OverrideMappings()
        注册缺省的sequence生成器
    • Method Detail

      • addClass

        public void addClass​(org.hibernate.mapping.PersistentClass pClass)
                      throws org.hibernate.DuplicateMappingException
        • First change jpaName to entityName
        • Duplicate register persistent class,hack hibernate(ToOneFkSecondPass.isInPrimaryKey)
        Specified by:
        addClass in interface org.hibernate.cfg.Mappings
        Throws:
        org.hibernate.DuplicateMappingException
      • addImport

        public void addImport​(String entityName,
                              String rename)
                       throws org.hibernate.DuplicateMappingException
        Duplicated entity name in sup/subclass situation will rise a DuplicateMappingException
        Specified by:
        addImport in interface org.hibernate.cfg.Mappings
        Throws:
        org.hibernate.DuplicateMappingException
      • addCollection

        public void addCollection​(org.hibernate.mapping.Collection collection)
                           throws org.hibernate.DuplicateMappingException
        Delay register collection,let class descide which owner will be winner.
        • Provide override collections with same rolename.
        • Delay register collection,register by addClass method
        Specified by:
        addCollection in interface org.hibernate.cfg.Mappings
        Throws:
        org.hibernate.DuplicateMappingException