leeensminger / OED_Wetlands

0 stars 0 forks source link

Update Associations for Mitigation Site fails #43

Closed sfabijanski closed 9 years ago

sfabijanski commented 9 years ago

The object that is posted is based on the /api/help documentation. When the request posts, the service throws an error. Please verify the posted data is in the correct format, or if the service is not working as expected.

Details:

url: http://vm-city102/Wetland/api/Project/UpdateProjectMitSite?

request: Referer: http://localhost:8000/flexviewer_2.2/gov/sha/widgets/wetlands/Wetland.swf Content-type: application/json Content-length: 196 {"PROJECT":"881aaf2e-80bb-4d75-897c-174666abaefe","MITSITE_STAREA_ID":[{"MITIGATION_SITE_ID":"b95bd6f1-40d8-4b0a-9040-7ac8f7a8ce4a"},{"MITIGATION_SITE_ID":"ca43253c-bef5-4389-a7c1-3302ec6e302f"}]}

response: Add Project MitSite Error: ORA-01400: cannot insert NULL into ("OEDWETLANDS"."JUNCTION_PROJECT_MIT_SITES"."MITIGATION_SITE_ID") ORA-06512: at "OEDWETLANDS.WETLANDS_PROJECT", line 976 ORA-06512: at line 1 Add Project MitSite Error: ORA-01400: cannot insert NULL into ("OEDWETLANDS"."JUNCTION_PROJECT_MIT_SITES"."MITIGATION_SITE_ID") ORA-06512: at "OEDWETLANDS.WETLANDS_PROJECT", line 976 ORA-06512: at line 1

vijme commented 9 years ago

@sfabijanski, please use the name "STRING_NAME" instead of "MITIGATION_SITE_ID" in your object. Since this object is used for various purpose, given a common name. The same object with name changed worked.

{"PROJECT":"881aaf2e-80bb-4d75-897c-174666abaefe"," MITSITE_STAREA_ID":[{"STRING_NAME":"b95bd6f1-40d8-4b0a-9040-7ac8f7a8ce4a"}, {"STRING_NAME":"ca43253c-bef5-4389-a7c1-3302ec6e302f"}]}

sfabijanski commented 9 years ago

STRING_NAME works.