Skip to content

Remove rx.Model #6244

@masenf

Description

@masenf

rx.Model is already deprecated. This issue tracks its full removal from the codebase.

Context

rx.Model was a thin wrapper around SQLModel intended to simplify database models. In practice it created a parallel ORM that confused users who already knew SQLAlchemy and limited access to the full ecosystem. It has been deprecated and users have been directed to use standard model bases instead.

What to Remove

  • rx.Model class and all supporting code
  • Any internal usage of rx.Model in examples, templates, or tests
  • Related documentation referencing rx.Model as current API

What Users Should Use Instead

  • sqlalchemy.orm.DeclarativeBase (standard SQLAlchemy)
  • sqlmodel.SQLModel (if they prefer SQLModel's API)
  • sqlalchemy.orm.MappedAsDataclass (for dataclass-style models)
  • Any SQLAlchemy-compatible model base

Tracking

Parent: ENG-9181 (Database & ORM: Less Opinionated, More Compatible)
Roadmap: #2727

Metadata

Metadata

Assignees

No one assigned

    Labels

    roadmaphttps://github.com/reflex-dev/reflex/issues/2727

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions