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?