yasserconnect
yasserconnect
DTDrizzle Team
Created by yasserconnect on 8/1/2024 in #help
[BUG]: orderBy causes relational query to fail
const shipmentQuery = await db.query.shipment.findMany({ with: { products: true, }, // [BUG]: orderBy causes relational query to fail // orderBy: desc(shipment.createdAt), }); same issue here: https://github.com/drizzle-team/drizzle-orm/issues/1249 i cannot use orderBy any fix?
17 replies
DTDrizzle Team
Created by yasserconnect on 7/5/2024 in #help
use limit or undefined
const limit = searchParams?.get('limit'); const shipmentsQuery = db .select() .from(shipment) .orderBy(desc(shipment.createdAt)) .limit(limit? limit : undefined); i want to use limit when is has value if not then use without a limit?
12 replies