flâneur — a map of the web's best reading

Types of Mappings — SQLAlchemy 1.3 Documentation

docs.sqlalchemy.org · 1,119 words · saved by 1 readers

Modern SQLAlchemy features two distinct styles of mapper configuration. The “Classical” style is SQLAlchemy’s original mapping API, whereas “Declarative” is the richer and more succinct system that builds on top of “Classical”. Both styles may be used interchangeably, as the end result of each is exactly the same - a user-defined class mapped by the mapper() function onto a selectable unit, typically a Table. The Declarative Mapping is the typical way that mappings are constructed in modern SQLAlchemy. Making use of the Declarative system, the components of the user-defined class as well as the Table metadata to which the class is mapped are defined at once: Above, a basic single-table mapping with four columns. Additional attributes, such as relationships to other mapped classes, are also declared inline within the class definition: The declarative mapping system is introduced in the Object Relational Tutorial. For additional details on how this system works, see Declarative. A Classi

Types of Mappings - SQLAlchemy 1.3 Documentation via SQLAlchemy adapter --> Release: 1.3.24 legacy version | Release Date: March 30, 2021 SQLAlchemy 1.3 Documentation SQLAlchemy 1.3 Documentation legacy version Home | Download this Documentation Search terms: SQLAlchemy ORM Object Relational Tutorial Mapper Configuration Types of Mappings ¶ Declarative Mapping Classical Mappings Runtime Introspection of Mappings, Objects Mapping Columns and Expressions Mapping Class Inheritance Hierarchies Non-Traditional Mappings Configuring a Version Counter Class Mapping API Relationship Configuration Loadi

Explore this link on the map →

related reading