Added support for foreign keys