Start a new topic

KinveFile reference not resolving when entity created using Business Logic

Hi Guys

Strange one. When I create an entity with using BL and set the creator to the APP ID {"creator": "kid_rxxxxxx"},  file references will not resolve when the entity is fetched. But this is where it get strange. If I open any field (in the editor) via console (add and remove couple spaces so it saves again but don't change it) then close it, the files will resolve on the next fetch. 

Collection security = Shared

What I am I doing wrong? 

So to recap - Steps:

1. Send entity to custom endpoint

2. Modify _acl to set to app id as creator

3. Save to new collection

4. KinveyFile refs will not resolve (retry multiple times) 

5. Open any field in console, add and remove a space so it saves but do not modify

6. Close popup editor

7 KinveyFile refs now resolve when fetching. 

I have also tried not modifying the _acl and using default _acl, this does not change the result. For some reason KinveyFile refs will not resolve until a field has been "edited" via console when the entity is created using BL. 

Use Case:

The data saved to the new collection is for a public report. The creator _acl is set to the app id so that no-one can edit the data, even the caller unless through custom endpoints to ensure its integrity. The collection security is set to shared so that anyone can fetch the data but no one can edit it. 

1 Comment

Hey has anyone been able to replicate this one? Given I cannot merge file entities with post-fetch it means the only option I have is to front load more calls to go get images which seems silly given the file refs work as intended (but only if I manually modify the entity haha)

Login or Signup to post a comment