Example usage for org.hibernate.mapping Table getForeignKeys

List of usage examples for org.hibernate.mapping Table getForeignKeys

Introduction

In this page you can find the example usage for org.hibernate.mapping Table getForeignKeys.

Prototype

public Map<ForeignKeyKey, ForeignKey> getForeignKeys() 

Source Link

Usage

From source file:com.manydesigns.portofino.persistence.hibernate.HibernateConfig.java

License:Open Source License

private void m2oMapping(Database database, Configuration configuration, Mappings mappings) {
    for (Schema schema : database.getSchemas()) {
        for (com.manydesigns.portofino.model.database.Table aTable : schema.getTables()) {
            for (ForeignKey rel : aTable.getForeignKeys()) {
                logger.debug(MessageFormat.format("Many to one - {0} {1}", aTable.getQualifiedName(),
                        rel.getName()));
                createM2O(configuration, mappings, rel);
            }//  w  w w .ja va  2  s  . c  o  m
        }
    }
}