Fix issue with foreign key references when class name doesn't match table name (closes #12)