-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
bugSomething isn't workingSomething isn't workingdataclassesormorm - annotated declarativeissues with the new annotations-based declarative ORM approachissues with the new annotations-based declarative ORM approach
Milestone
Description
This example raises
AssertionError: Mapped[] received without a mapping declaration
import sqlalchemy as sa
from sqlalchemy.orm import Mapped, MappedAsDataclass, DeclarativeBase
t = sa.Table(
"x",
sa.MetaData(),
sa.Column("id", sa.Integer, primary_key=True),
sa.Column("name", sa.Text),
)
class Base(MappedAsDataclass, DeclarativeBase):
pass
class X(Base):
__table__ = t
id: Mapped[int]
name: Mapped[int]Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdataclassesormorm - annotated declarativeissues with the new annotations-based declarative ORM approachissues with the new annotations-based declarative ORM approach