[AppwriteException: Invalid query: Attribute not found in schema: MRP]
- 1
- Databases
- Realtime
- Cloud
Using AppWrite Cloud & Im facing issues when running Queries in collection. Actually,the queries is running perfectly fine in my old colelctions and I've tested all queries function on them but In New Collections,i am getting an error while querying even fetching & creating the data is working well on new collections but unable to do query
Like if I run query ::
Query.equal('Name', 'Coca Cola')
getting an error ::
ERROR Error fetching city data: [AppwriteException: Invalid query: Attribute not found in schema: Name]
While I've attribute named Name in my collection. Ive tested all queries function in these new collections but none of them is working.
See, fetching whole data is working well but unable to use Query in new collections...I've created 3 new collections and none of them is working fine with Query
The attribute name was created recently?
3 hours ago
Hey 👋 Very weird, Ill try to reproduce it quickly on my end
- Create database
main - Create collection
profiles - Add attribute
Name, string length=255, required - Add
keyindex forNameattribute - Add 2 documents with different names
- In settings give
readpermission toAny - Send request with query
Seems to work fine on my end. Can you please confirm these steps result in error for you?
Wild idea, it might be backend cache issue. To test that ,can you please try to rename your database and collection? Random name, save, then back to original name, save. That forces cache to cleared. If it starts working fine after that, we know it's issue on cache layer
1.In my database data-level-1
2.Created collection profiles
3.Added attribute Name
4.Added key index
5.Added 2 documents
6.Gave permission
7.Query is working fine [ getting expected result ]
***BUT *this I know and the same method I'm using on different collections as well & they're working well
See my colections
https://discord.com/34943382-3675-4669-9e2f-5e4317adea49
I am facing Query issue in the collection PRDB
Yes,I created another collection with same data but still error persists.
See,I've attached the PRDB collections.
Fetching whole data is working fine
const databases = new Databases(client);
const response = await databases.listDocuments('data-level-1', 'PRDB');
console.log(response);
But,with Query it is giving an error.
ERROR:: ERROR Error fetching city data: [AppwriteException: Invalid query: Attribute not found in schema: Name]
CODE ::
const response = await databases.listDocuments('data-level-1', 'PRDB',
** [Query.equal('Name','Coca Cola')]**
);
console.log(response);`
``
Also,getting an error on creating index in Name attribute
Did you at any point delete collection, and created collection with same custom ID?
No
I'm unabe to figure out the main cause of this issue. What I tried till now? 1.Changed Collection Name 2.Re-Created the collection with same attributes / data
recreating the collection should have solved things...so the problem now is failed index?
Recommended threads
- Relation Question
How do I create a relation from table y to an others x.$id. in my example I have a users table where I use Appwrites unique User IDs and I want other tables fo...
- Unknown attribute type: varchar / text
Since the `string` type is deprecated I tried using `varchar` and `text` in some newer tables, but when running `appwrite pull tables && appwrite types ./src/li...
- I'm experiencing a critical bug on Appwr...
Hey <@870607367597850624> team / support 👋 I'm experiencing a critical bug on Appwrite Cloud that's blocking my production Flutter app. I've already filed GitH...