la flame
la flame
PPrisma
Created by la flame on 4/24/2024 in #help-and-questions
[MongoDB] dup key: { itemId: null }, labels: {}
Error: MongoDB error
Kind: Command failed: Error code 11000 (DuplicateKey): Index build failed: 83c54d6a-ffb6-44a5-8c6e-4ada6aa59ad6: Collection db.Collection ( 3fb85909-5e6c-4151-9a94-d99bdc225628 ) :: caused by :: E11000 duplicate key error collection: db.Collection index: Collection_itemId_key dup key: { itemId: null }, labels: {}
0: schema_core::state::SchemaPush
at schema-engine/core/src/state.rs:433
Error: MongoDB error
Kind: Command failed: Error code 11000 (DuplicateKey): Index build failed: 83c54d6a-ffb6-44a5-8c6e-4ada6aa59ad6: Collection db.Collection ( 3fb85909-5e6c-4151-9a94-d99bdc225628 ) :: caused by :: E11000 duplicate key error collection: db.Collection index: Collection_itemId_key dup key: { itemId: null }, labels: {}
0: schema_core::state::SchemaPush
at schema-engine/core/src/state.rs:433
Started getting this error for no reason, because I made aggregate and found no itemId with count > 1
3 replies
PPrisma
Created by la flame on 3/15/2024 in #help-and-questions
Prisma(postgres) stuck at `where: {assets: {none: {}}}`
I understand that the query is tight. But isn't there a way to do it? I have only ~1m records in assets. My goal is to get entity where assetsCount = 0(without raw queries); For example this query works lightning fast.
SELECT "entityId", COUNT(*) AS "count" FROM "Asset" GROUP BY "entityId" ORDER BY count;
SELECT "entityId", COUNT(*) AS "count" FROM "Asset" GROUP BY "entityId" ORDER BY count;
I'm asking if I'm doing things wrong or over-complicated. I'm not count this as prisma problem:heart:
1 replies