This repository has been archived by the owner on Apr 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 94
jaydata maps an empty string to null #276
Comments
I've no problem with this default behavior, but if you have a problem with that, you can do something like this:
The original required of jaydata for arrays is (array != null) condition, but I think that empty array should results in a required error too, so I've rewritten that with a code I've provided to you (-: |
Thanks for your answer. If i replace "$data.Array" with "$data.String" then I can stop for all key fields with type "Edm.String". So far so good. But at this point my key filed has already the value "null". Is there a possibility to step in earlier, for example, at the point of mapping from odata to jaydata? |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
I've used JaySvcUtil to generate the entity model out of my oData service. The description is correct generated. I have multiple string keys for one Entity. A oData call for that Entity gives me, for example, the following result (the yellow marked properties are the key columns):
One of the key columns (THEME) contains an empty string. After mapping with jaydata the empty string is transformed to "null". This gives me an valildation error because the key filed is required and seems to be null. See the following screenshot.
How can I resolve this issue? Is there any possibility to tell jaydata that an empty string is okay for the a field that is defined as "Edm.String"?
The text was updated successfully, but these errors were encountered: