support primay_key for AR