Returned reference id is different than the id stored in the database (same query)

Hello there, nice people!
I am running the query below.

If I use the first variation of Select (just reading the document I created), the reference ID returned differs from the one stored in the database.

However, the second Select (using a Get before Select) returns the correct ID.

Let(
    {
        doc: Create(Collection('someCollection'), {
            data: {
                studio: CurrentIdentity(),
                field1: '...',
                field2: '...',
            },
        }),
    },
    // The problem  is here
    Select(['ref', 'id'], Var('doc'))  // RETURNS INCORRECT ID
    Select(['ref', 'id'], Get(Select('ref', Var('doc')))) //RETURNS CORRECT ID
)

Does anybody know if this is a known bug?

I am still observing this issue months after the original post.
The returned ID of the query is very similar to the created ID, except for the three last numbers.

394074176062750(786)
394074176062750(800)

This is something worth investigating on the FaunaDB side.

Hi @armando. Sorry this slipped through the cracks. I just moved the topic to the help category.

I can’t replicate the issue. Can you demonstrate the issue in your dashboard or otherwise? Running this several times in my dashboard shows that all of the IDs are the same.

image

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.