Refine association and add beforeShowError