org.hibernate.cfg.Configuration.secondPassCompileForeignKeys()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(113)

本文整理了Java中org.hibernate.cfg.Configuration.secondPassCompileForeignKeys()方法的一些代码示例,展示了Configuration.secondPassCompileForeignKeys()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Configuration.secondPassCompileForeignKeys()方法的具体详情如下:
包路径:org.hibernate.cfg.Configuration
类名称:Configuration
方法名:secondPassCompileForeignKeys

Configuration.secondPassCompileForeignKeys介绍

暂无

代码示例

代码示例来源:origin: hibernate/hibernate

while ( iter.hasNext() ) secondPassCompileForeignKeys( ( Table ) iter.next(), done );

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core

Set<ForeignKey> done = new HashSet<ForeignKey>();
while ( itr.hasNext() ) {
  secondPassCompileForeignKeys( (Table) itr.next(), done );

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate

Set<ForeignKey> done = new HashSet<ForeignKey>();
while ( itr.hasNext() ) {
  secondPassCompileForeignKeys( (Table) itr.next(), done );

代码示例来源:origin: hibernate/hibernate

protected void secondPassCompileForeignKeys(Table table, Set done) throws MappingException {
  table.createForeignKeys();
  Iterator iter = table.getForeignKeyIterator();
  while ( iter.hasNext() ) {
    ForeignKey fk = ( ForeignKey ) iter.next();
    if ( !done.contains( fk ) ) {
      done.add( fk );
      final String referencedEntityName = fk.getReferencedEntityName();
      if (referencedEntityName==null) {
        throw new MappingException("An association from the table "+
            fk.getTable().getName() +
            " does not specify the referenced entity" );
      }
      if ( log.isDebugEnabled() ) {
        log.debug( "resolving reference to class: " + referencedEntityName );
      }
      PersistentClass referencedClass = ( PersistentClass ) classes.get( referencedEntityName );
      if ( referencedClass == null ) {
        throw new MappingException( "An association from the table " +
            fk.getTable().getName() +
            " refers to an unmapped class: " +
            referencedEntityName );
      }
      if ( referencedClass.isJoinedSubclass() ) {
        secondPassCompileForeignKeys( referencedClass.getSuperclass().getTable(), done );
      }
      fk.setReferencedTable( referencedClass.getTable() );
    }
  }
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core

secondPassCompileForeignKeys( referencedClass.getSuperclass().getTable(), done );

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate

secondPassCompileForeignKeys( referencedClass.getSuperclass().getTable(), done );

相关文章

Configuration类方法