[SOLVED] Create document with unique() id and no unique indexes throws document_already_exists
- 0
- Databases
no - everything is ok with my relationships - here is data
{
"name":"Współczesność – o epoce",
"onlyForPremium":false,
"isMediaPremiumOnly":false,
"mainMedia":"https://vimeo.com/855166568",
"mediaType":"video",
"mediaSource":"vimeo",
"mediaThumbnail":"64f5c6fef098d9d485d8",
"mediaContent":"64f5c6ff0ce0bb1785b0",
"slug":null,
"createdBy":null,
"createdById":null,
"updatedBy":null,
"updatedById":null,
"oldTitle":null,
"oldAuthor":null,
"oldCategory":null,
"preview":"word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word",
"metaTitle":null,
"metaDescription":null,
"metaKeywords":null,
"zdayId":"29005",
"content":[
],
"contentIds":null,
"oldId":null,
"assignedToCategories":[
"64f79cced50f0fee7825"
],
"search_name_zdayId":"Współczesność – o epoce 29005"
}
this is interesting
65 Query START TRANSACTION
65 Query INSERT INTO `appwrite`.`_1_database_1_collection_19`
(`name`, `onlyForPremium`, `isMediaPremiumOnly`, `mainMedia`, `mediaType`, `mediaSource`, `mediaThumbnail`, `mediaContent`, `slug`, `createdBy`, `createdById`, `updatedBy`, `updatedById`, `oldTitle`, `oldAuthor`, `oldCategory`, `preview`, `metaTitle`, `metaDescription`, `metaKeywords`, `zdayId`, `contentIds`, `oldId`, `search_name_zdayId`, `_createdAt`, `_updatedAt`, `_permissions`, _uid) VALUES ('Współczesność – o epoce', 0, 0, 'https://vimeo.com/855166568', 'video', 'vimeo', '64f5c6fef098d9d485d8', '64f5c6ff0ce0bb1785b0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word', NULL, NULL, NULL, '29005', NULL, NULL, 'Współczesność – o epoce 29005', '2023-09-05 21:40:15.225', '2023-09-05 21:40:15.225', '[]', '64f7a03f3663e31c0619')
65 Query ROLLBACK
removing relationship doesn't change anything
shouldn't be there some error log that points out which unique parameter is failing? like unique _uid
ya we need to improve that error
what collection is that? _1_database_1_collection_19 is it supposed to be inserting? I don't think so, right?
how to check that? collection name is content_entry
but content is blank here 🧐
yes. empty list for that one
same for content null
{
"name":"Współczesność – o epoce",
"onlyForPremium":false,
"isMediaPremiumOnly":false,
"mainMedia":"https://vimeo.com/855166568",
"mediaType":"video",
"mediaSource":"vimeo",
"mediaThumbnail":"64f5c6fef098d9d485d8",
"mediaContent":"64f5c6ff0ce0bb1785b0",
"slug":null,
"createdBy":null,
"createdById":null,
"updatedBy":null,
"updatedById":null,
"oldTitle":null,
"oldAuthor":null,
"oldCategory":null,
"preview":"word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word",
"metaTitle":null,
"metaDescription":null,
"metaKeywords":null,
"zdayId":"29005",
"content":null,
"contentIds":null,
"oldId":null,
"assignedToCategories":null,
"search_name_zdayId":"Współczesność – o epoce 29005"
}
inside appwrite sdk - documentId is unique for sure
ok i found something
when creating document with the same values
1:1 data - it cannot be created event if there is no unique index
ok found it
this is caused by a one to one relationship
and I'm trying to assign manytoone
the assignedToCategories?
mediaThumbnail
and mediaContent
message was just a litle bit misleading
thanks for help!
[SOLVED] Create document with unique() id and no unique indexes throws document_already_exists
Recommended threads
- Weird permission failure
when creating an account I use following methods: ``` Future<void> register(String email, String password, String username) async { final user = await accoun...
- 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...