Hi Sarvagya,
You are more likely to receive help if you post the complete stack trace and the definition for model. Please see
Hope this helps you to get the help you are asking for.