fix relation linking on create and infer classname if omitted