mendix / RestServices

REST service module for Mendix. Supports consuming and publishing REST based services and real-time data synchronization. Supports JSON, form-encoded, multipart and binary data transport.
Apache License 2.0
31 stars 46 forks source link

When publishing a service, and using the Get operation with ChangeLog enable, references are not included #52

Closed jaspervanderhoek closed 8 years ago

jaspervanderhoek commented 9 years ago

when an object is retrieved through the default get service: rest/orders/12312312

the json below is returned. { "Comments": "Empty test case", "Value": 20.22,"OrderDate": 1425920400000,"OrderNumber": 290831079, "OrderLines": [ { "Quantity": 1, "LineNumber": null, "Product": "Product1", "LinePrice": 10.99 } ] }

However when using the ChangeLog, the index that was created does not contain any references. The microflow behaves correct and serializes the correct information without the changelog. But the changelog never contains my orderline information.

The same order in the indexed object list looks like this: { "Comments": "Empty test case", "Value": 20.22, "OrderDate": 1425920400000, "OrderNumber": 290831079, "OrderLines": [ ] }

mweststrate commented 9 years ago

Hi Jasper,

Which Mendix version are you using?

jaspervanderhoek commented 9 years ago

This was in 5.9.1 with the version from github from last Monday. On Fri, Mar 13, 2015 at 18:58 Michel Weststrate notifications@github.com wrote:

Hi Jasper,

Which Mendix version are you using?

— Reply to this email directly or view it on GitHub https://github.com/mendix/RestServices/issues/52#issuecomment-79516782.

mweststrate commented 9 years ago

Some notes: The same serialization process as in normal calls is used.

Possible cause: publish/ChangeLogManager.publishUpdate needs to wrap its code in a utils.withSessionCache. If references don't resolve, missing (already dropped) entries in the session cache are usually the cause.

also: add tests with reference to test/ChangeTests.java