Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

SQLAlchemy and Imperative Mapping (a.k.a. Classical Mapping) #341

Open

Description

In chapter 02, it's stated that the classical mapping is an alternative to the declarative mapping and that:

This gives us all the benefits of SQLAlchemy

See here: https://github.com/cosmicpython/book/blob/master/chapter_02_repository.asciidoc#inverting-the-dependency-orm-depends-on-model

But, in the SQLAlchemy documentation about Imperative/Classical Mapping, the following is stated:

The imperative mapping form is a lesser-used form of mapping that originates from the very first releases of SQLAlchemy in 2006. It’s essentially a means of bypassing the Declarative system to provide a more "barebones" system of mapping, and does not offer modern features such as PEP 484 support. As such, most documentation examples use Declarative forms, and it’s recommended that new users start with Declarative Table configuration.

(Emphasis mine)

The content of this chapter should probably be modified to indicate that.
Also, is there an alternative that would use the recommended Declarative mapping?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /