Home / Function/ productsRelations() — drizzle-orm Function Reference

productsRelations() — drizzle-orm Function Reference

Architecture documentation for the productsRelations() function in mysqlSchema.ts from the drizzle-orm codebase.

Entity Profile

Dependency Diagram

graph TD
  68225b99_e05d_34c2_4822_b2a68f6dbafc["productsRelations()"]
  4e09dc96_2560_ffd2_131d_3920513a360d["mysqlSchema.ts"]
  68225b99_e05d_34c2_4822_b2a68f6dbafc -->|defined in| 4e09dc96_2560_ffd2_131d_3920513a360d
  style 68225b99_e05d_34c2_4822_b2a68f6dbafc fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-seed/tests/mysql/softRelationsTest/mysqlSchema.ts lines 102–107

export const productsRelations = relations(products, ({ one }) => ({
	supplier: one(suppliers, {
		fields: [products.supplierId],
		references: [suppliers.id],
	}),
}));

Domain

Subdomains

Frequently Asked Questions

What does productsRelations() do?
productsRelations() is a function in the drizzle-orm codebase, defined in drizzle-seed/tests/mysql/softRelationsTest/mysqlSchema.ts.
Where is productsRelations() defined?
productsRelations() is defined in drizzle-seed/tests/mysql/softRelationsTest/mysqlSchema.ts at line 102.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free