Our pure JavaScript Scheduler component


Post by rytis.i »

I'm using scheduler with restful Urls

 eventStore: {
        autoLoad: true,
        autoCommit: true,
        readUrl: 'http://localhost:3030/event',
        createUrl: 'http://localhost:3030/event',
        updateUrl: 'http://localhost:3030/event',
        deleteUrl: 'http://localhost:3030/event',
        useRestfulMethods: true
    },

when scheduler is loaded and the backend GET request returns empty event list the fist POST request is missing resourceId property. After first event is created and page is reloaded all POST requests contain resourceId as expected.

Gif and code attached

Attachments
resource-id.zip
(28.09 KiB) Downloaded 14 times
resource_id_missing.gif
resource_id_missing.gif (2.18 MiB) Viewed 120 times

Post by mats »

Try putting singleAssignment config to true on your EventStore.


Post by rytis.i »

That does help. Is the described behavior with singleAssignment: false expected or is it a bug?


Post by joakim.l »

If the singleAssignment config is not set, it detects the mode automatically, but that only works if there is events loaded. We will update the docs to be more clear that setting singleAssignment to true is recommended if you don't use a separate assignment store (setting resourceId directly on the event).

Regards
Joakim


Post Reply