brightsl
brightsl
DTDrizzle Team
Created by brightsl on 7/16/2024 in #help
Add where clause on 1-1 relation (Query mode)
I want to include relation 1-1 with where clause such as ‘isNull(table.deletedAt)’ Now i use alternative way define relations with one-many that allow me to add where clause on query mode. and get data from first element of array Example db.query.products.findfirst({ with: { images: { where: isNull(images.deletedAt) } } }) But It’s not allow me when 1-1 relation Thank you so much
2 replies