Adding support to explicitly set foreign keys in relations