本文整理了Java中org.hibernate.cfg.Configuration.secondPassCompileForeignKeys()
方法的一些代码示例,展示了Configuration.secondPassCompileForeignKeys()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Configuration.secondPassCompileForeignKeys()
方法的具体详情如下:
包路径:org.hibernate.cfg.Configuration
类名称: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 );
内容来源于网络,如有侵权,请联系作者删除!