Hi everyone, I found a strange behavior when creating collections. Maybe someone could help me to clarify this behavior:
I have 3 collections with the following names:
- classes
- instructors
- schedules
The documents on the “schedules” collection contains references to “classes” and “instructors”, so I am using the following query to create a schedule document:
Create(Collection("schedules"), {
data: {
instructor: Ref(Collection("instructors"), "272520429002818066"),
class: Ref(Collection("classes"), "268697866226106880"),
}
}
The query executes well, however the data inserted looks like this:
{
"ref": Ref(Collection("schedules"), "274572704420463122"),
"ts": 1598111786260000,
"data": {
"instructor": Ref(Collection("instructors"), "272520429002818066"),
"class": Class("268697866226106880"),
}
}
The “class” property DOESN’T contain a reference to the classes collection, it contains a “Class()” function, that is deprecated according to the docs, why am I not getting a reference in this case? Is there a restriction regarding the name of the collection named “classes”.
Appreciate any help