Getting constraint violation error during event registration. I found that, this error happening when it's saving the custom field value after saving participant info. There is a post hook in my custom module, in that i have code(civicrm_api("Relationship", "create",$params)) to create relationship for contact, if i comment that line it's working fine. Current version am using is CiviCRM 4.6.2. This issue was not there with my previous version 4.3.5.
Can we not use create-api in post hook?