Entity already in model: $id
Closed, ResolvedPublic

Description

This warning still appears occasionally for unknown reason.
It warns about a query delivering the same entity multiple times to the model, which the model then ignores. I'm not aware of a case where that would be expected behavior though.

I have a somewhat minimal testscript in the form of a modified views/calendar/main.qml in kube:

ApplicationWindow {
    id: app
    height: Screen.desktopAvailableHeight * 0.8
    width: Screen.desktopAvailableWidth * 0.8

    Component.onCompleted: {
        var initialState = {
            accounts: [
                {
                    id: "account1",
                    name: "Test Account"
                },
                {
                    id: "account2",
                    name: "Test Account2"
                },
            ],
            identities: [{
                account: "account1",
                name: "Test Identity",
                address: "identity@example.org"
            }],
            resources: [
                {
                    id: "caldavresource",
                    account: "account1",
                    type: "caldav",
                },
            ],
            calendars: [{
                id: "calendar1",
                resource: "caldavresource",
                name: "Test Calendar",
                color: "#af1a6a",
                events: [
                    // {
                    //     resource: "caldavresource",
                    //     summary: "Test Event4",
                    //     description: "This is test event #4",
                    //     starts: "2018-04-12T03:00:00",
                    //     ends:   "2018-04-14T22:00:00",
                    // },
                    {
                        resource: "caldavresource",
                        summary: "!!! Test Event5",
                        description: "!!! This is test event #5",
                        starts: "2018-04-22T22:00:00",
                        ends:   "2018-04-25T03:00:00",
                    },

            ],
        }
        TestStore.setup(initialState)
    }

    View {
        anchors.fill: parent
        currentDate: "2018-04-11T13:00:00"
        autoUpdateDate: false
    }
}

The warning is visible like this, but not if Event4 is used instead of Event5.

This is a log (with an assert next to the warning):

cmollekopf triaged this task as Normal priority.
cmollekopf moved this task from New to Confirmed on the Kube: Bugs board.Jan 7 2019, 9:57 PM
cmollekopf closed this task as Resolved.Aug 29 2019, 9:56 AM
cmollekopf claimed this task.

Can't reproduce, might have been fixed by the recent 1b416946f7c06ff075c7a7d2abacf05705500c3f

The above commit wasn't it (reverted it locally), but still can't reproduce atm.