Support define fk with class name
Safe connect call