Fixed schema generation when connected tables do not have primary key marked as id (int)