Confirmed. I read this but it completely escaped my mind when I was
building the demo. Is there a plan to make this more robust? Presumably,
we'd need a way to signal the type of the key - especially when it's a
compound key.

Thanks,

Mark

On Thu, Dec 17, 2015 at 11:00 PM, Barry Oglesby <[email protected]> wrote:

> I haven't tried this, but I do see 'Keys are strictly of type String for
> this release' in the 8.2 docs.
>
>
> http://gemfire.docs.pivotal.io/docs-gemfire/latest/rest_apps/rest_prereqs.html
>
> Barry Oglesby
> GemFire Advanced Customer Engineering (ACE)
> For immediate support please contact Pivotal Support at
> http://support.pivotal.io/
>
>
> On Thu, Dec 17, 2015 at 9:10 AM, Mark Secrist <[email protected]> wrote:
>
>> Maybe I'm missing something but I'm running into an issue related to
>> something as simple as GET'ing an entry by the key.
>>
>> The following two interactions help explain the dilemma.
>>
>> $ curl http://localhost:7071/gemfire-api/v1/BookOrder
>> {
>>   "BookOrder" : [ {
>>     "orderDate" : "12/17/2015",
>>     "shippingCost" : 5.99,
>>     "shipDate" : "12/17/2015",
>>     "totalPrice" : 40.98,
>>     "orderNumber" : 17699,
>>     "orderItems" : [ {
>>       "orderLine" : 1,
>>       "quantity" : 1.0,
>>       "discount" : 0.0,
>>       "itemNumber" : 123
>>     } ],
>>     "customerNumber" : 5598
>>   }, {
>>     "orderDate" : "12/17/2015",
>>     "shippingCost" : 5.99,
>>     "shipDate" : "12/17/2015",
>>     "totalPrice" : 52.97,
>>     "orderNumber" : 17700,
>>     "orderItems" : [ {
>>       "orderLine" : 1,
>>       "quantity" : 1.0,
>>       "discount" : 0.0,
>>       "itemNumber" : 123
>>     }, {
>>       "orderLine" : 2,
>>       "quantity" : 1.0,
>>       "discount" : 0.0,
>>       "itemNumber" : 456
>>     } ],
>>     "customerNumber" : 5543
>>   } ]
>> }
>> $ curl http://localhost:7071/gemfire-api/v1/BookOrder/17699
>> {"cause":"Key (17699) does not exist for region (BookOrder) in cache!"}
>>
>> The key is an integer, but I don't see anywhere in the documentation that
>> this matters in the request. I did notice that when I explicitly set the
>> key-constraint on the region that I get a type mismatch on the key type in
>> the request.
>>
>> Are there any good references on how to do this?
>>
>> Mark
>> --
>>
>> *Mark Secrist | Sr Manager, **Global Education Delivery*
>>
>> [email protected]
>>
>> 970.214.4567 Mobile
>>
>>   *pivotal.io <http://www.pivotal.io/>*
>>
>> Follow Us: Twitter <http://www.twitter.com/pivotal> | LinkedIn
>> <http://www.linkedin.com/company/pivotalsoftware> | Facebook
>> <http://www.facebook.com/pivotalsoftware> | YouTube
>> <http://www.youtube.com/gopivotal> | Google+
>> <https://plus.google.com/105320112436428794490>
>>
>
>


-- 

*Mark Secrist | Sr Manager, **Global Education Delivery*

[email protected]

970.214.4567 Mobile

  *pivotal.io <http://www.pivotal.io/>*

Follow Us: Twitter <http://www.twitter.com/pivotal> | LinkedIn
<http://www.linkedin.com/company/pivotalsoftware> | Facebook
<http://www.facebook.com/pivotalsoftware> | YouTube
<http://www.youtube.com/gopivotal> | Google+
<https://plus.google.com/105320112436428794490>

Reply via email to