{"id":2294,"date":"2014-06-18T02:34:34","date_gmt":"2014-06-18T02:34:34","guid":{"rendered":"http:\/\/www.garysieling.com\/blog\/?p=2294"},"modified":"2014-06-18T02:34:34","modified_gmt":"2014-06-18T02:34:34","slug":"fixing-olingo-error-format-1-compatible-edm-string","status":"publish","type":"post","link":"https:\/\/www.garysieling.com\/blog\/fixing-olingo-error-format-1-compatible-edm-string\/","title":{"rendered":"Fixing Olingo Error &#8220;Format of &#8216;1&#8217; is not compatible with &#8216;Edm.String&#8217;.&#8221;"},"content":{"rendered":"<p>When changing types in Olingo OData services, you may get an error like the following:<\/p>\n<pre>\nFormat of '1' is not compatible with 'Edm.String'.\n<\/pre>\n<p>This indicates you have a line like this:<\/p>\n<pre lang=\"java\">\nreturn type.valueOfString(key.getLiteral(), \n  EdmLiteralKind.DEFAULT, \n  property.getFacets(), \n  Integer.class);\n<\/pre>\n<p>Which should in fact be like this:<\/p>\n<pre lang=\"java\">\nreturn type.valueOfString(\n  key.getLiteral(), \n  EdmLiteralKind.DEFAULT, \n  property.getFacets(), \n  String.class);\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>When changing types in Olingo OData services, you may get an error like the following: Format of &#8216;1&#8217; is not compatible with &#8216;Edm.String&#8217;. This indicates you have a line like this: return type.valueOfString(key.getLiteral(), EdmLiteralKind.DEFAULT, property.getFacets(), Integer.class); Which should in fact be like this: return type.valueOfString( key.getLiteral(), EdmLiteralKind.DEFAULT, property.getFacets(), String.class);<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[9],"tags":[398,399],"aioseo_notices":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/2294"}],"collection":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/comments?post=2294"}],"version-history":[{"count":0,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/2294\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/media?parent=2294"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/categories?post=2294"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/tags?post=2294"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}