Tenkes
Explore posts from serversDTDrizzle Team
•Created by suljii on 1/8/2025 in #help
Cannot read properties of undefined (reading 'findMany')
and then whenever you define new tables to that file it will already be passed to drizzle(), since it's taking everything from that file
31 replies
DTDrizzle Team
•Created by suljii on 1/8/2025 in #help
Cannot read properties of undefined (reading 'findMany')
but it's simpler to import everything from your schema file and name it
schema
, so you can pass that to your drizzle(). just like I did in code snippet I sent from my project31 replies
DTDrizzle Team
•Created by suljii on 1/8/2025 in #help
Cannot read properties of undefined (reading 'findMany')
it can also be
31 replies
DTDrizzle Team
•Created by suljii on 1/8/2025 in #help
Cannot read properties of undefined (reading 'findMany')
same like you did
31 replies
DTDrizzle Team
•Created by suljii on 1/8/2025 in #help
Cannot read properties of undefined (reading 'findMany')
I believe this is required if you want to use
db.query
31 replies
DTDrizzle Team
•Created by suljii on 1/8/2025 in #help
Cannot read properties of undefined (reading 'findMany')
Oh I think you need to define schema in your drizzle connection.
Here's code snipped from my project:
31 replies
DTDrizzle Team
•Created by suljii on 1/8/2025 in #help
Cannot read properties of undefined (reading 'findMany')
should be
31 replies
DTDrizzle Team
•Created by Andreas on 1/2/2025 in #help
Cannot read properties of undefined (reading 'referencedTable') for many-to-many
That really sucks, hope you at least figured it out
18 replies
DTDrizzle Team
•Created by Andreas on 1/2/2025 in #help
Cannot read properties of undefined (reading 'referencedTable') for many-to-many
Or try to reset stuff, clear cache, generate and migrate db etc...
18 replies
DTDrizzle Team
•Created by Andreas on 1/2/2025 in #help
Cannot read properties of undefined (reading 'referencedTable') for many-to-many
18 replies
DTDrizzle Team
•Created by Andreas on 1/2/2025 in #help
Cannot read properties of undefined (reading 'referencedTable') for many-to-many
Yeah that might be it. Or more precisely it might be because in your barrel file you're renaming default to
user
instead of users
:
Same for teams. So either rename it or do what I said in previous message (I think it would be cleaner that way)18 replies
DTDrizzle Team
•Created by Andreas on 1/2/2025 in #help
Cannot read properties of undefined (reading 'referencedTable') for many-to-many
@Andreas
18 replies
DTDrizzle Team
•Created by Andreas on 1/2/2025 in #help
Cannot read properties of undefined (reading 'referencedTable') for many-to-many
Interesting, everything looks good... I'm only skeptical about the way you're exporting from your barrel file and about the fact you're default-exporting your tables when you're already exporting them. Maybe remove
export default
from all your schema files and then your barrel file should look something like:
18 replies
DTDrizzle Team
•Created by Andreas on 1/2/2025 in #help
Cannot read properties of undefined (reading 'referencedTable') for many-to-many
ans then when you want to loop through them you would do:
18 replies
DTDrizzle Team
•Created by Andreas on 1/2/2025 in #help
Cannot read properties of undefined (reading 'referencedTable') for many-to-many
18 replies
DTDrizzle Team
•Created by Andreas on 1/2/2025 in #help
Cannot read properties of undefined (reading 'referencedTable') for many-to-many
(ping me when you reply)
18 replies
DTDrizzle Team
•Created by Andreas on 1/2/2025 in #help
Cannot read properties of undefined (reading 'referencedTable') for many-to-many
Can you send files where you defined tables and relations? These files to be specific:
18 replies
DTDrizzle Team
•Created by Tenkes on 9/22/2024 in #help
PostgresError: foreign key constraint "product_categories_category_id_fk" cannot be implemented
wdym?
14 replies
DTDrizzle Team
•Created by Tenkes on 9/22/2024 in #help
PostgresError: foreign key constraint "product_categories_category_id_fk" cannot be implemented
I can't add
{ onDelete: 'cascade' }
if I'm using relations?14 replies
DTDrizzle Team
•Created by Tenkes on 9/22/2024 in #help
PostgresError: foreign key constraint "product_categories_category_id_fk" cannot be implemented
omg that's just amazing.. THANKS!
14 replies