vendure-entity-writing

Generate Vendure database entities with TypeORM decorators and relations.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/meriley/claude-code-skills --skill vendure-entity-writing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vendure-entity-writing
Source: https://github.com/meriley/claude-code-skills/tree/main/skills/vendure-entity-writing
Command: npx skills add https://github.com/meriley/claude-code-skills --skill vendure-entity-writing

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the creation of database models for Vendure applications, ensuring adherence to best practices for TypeORM decorators, relations, and channel-awareness.

Core Features & Use Cases

  • Entity Definition: Generates TypeScript classes for Vendure entities, including decorators like @Entity(), @Column(), and relation decorators.
  • Best Practice Enforcement: Guides users to extend VendureEntity, use DeepPartial for constructors, and implement proper migration strategies.
  • Use Case: When developing a new feature in Vendure that requires a custom database table (e.g., a ProductReview entity), this Skill provides the blueprint and guidance to create it correctly.

Quick Start

Use the vendure-entity-writing skill to create a new entity class named 'ProductReview' that extends VendureEntity.

Frequently Asked Questions about vendure-entity-writing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a custom database entity in Vendure?

Creating a custom database entity in Vendure involves generating a TypeScript class that extends VendureEntity, applying TypeORM decorators like @Entity() and @Column(), and implementing a constructor using DeepPartial for type-safe initialization.

What is VendureEntity used for in TypeORM database models?

VendureEntity is the base class used to ensure custom database models comply with Vendure framework conventions, providing necessary channel-awareness and structural consistency for TypeORM schema generation.

Does Vendure require migration files for new TypeORM entities?

Yes, Vendure requires migration files for new TypeORM entities to properly apply schema changes to the database, ensuring that custom database tables like a ProductReview model are tracked and updated systematically.

How do I add relations to a Vendure database entity?

To add relations to a Vendure database entity, you use TypeORM relation decorators within your TypeScript class, ensuring the custom model correctly maps foreign keys and associations while extending VendureEntity.

What is the best way to ensure channel-awareness in a Vendure custom entity?

The best way to ensure channel-awareness in a Vendure custom entity is to extend the VendureEntity base class, which inherently manages multi-channel data isolation and framework compliance during TypeORM schema definition.

Why does my Vendure custom entity fail to save to the database?

Custom Vendure entities fail to save when they do not extend VendureEntity or lack proper TypeORM decorators, which breaks framework conventions and prevents the ORM from mapping the TypeScript class to the database schema.