[haiyang] append the one to one and many to one reference key into select sql