Details
-
Bug
-
Resolution: Duplicate
-
Critical
-
None
-
1.1dp
-
Security Level: Public
-
None
-
Impediment
Description
I have a view with string keys which happen to also be valid integers. In this case routing numbers that can have leading zeros. When I perform a get in using the Java API, the request forwarded to the database assumes I actually meant to send an integer type and the quotes are not sent to as apart of the database query, along with the leading zero now trimmed. If I try to force quotes into the key string, I get extra keys sent with the query.
I'm assuming the API is guessing the query type based on my input but wouldn't it be better to overload the method for specific types, specifically the primitive types?
Example:
query.setKey("011601087"); results in ?stale=false&key=011601087 but I need ?stale=false&key="011601087"
If I try:
query.setKey("\"011601087\""); results in ?stale=false&key=011601087 but I need ?stale=false&key=""011601087""