OS: Windows 11 Pro 24H2
Python: 3.13.5
Adaptix: 3.0.0b11
Hello, discovered a bug in the conversion of an SQLAlchemy model to a dataclass when the model contains a field with a different name than the
corresponding column in the database. However, the reverse conversion works correctly.
Here's the MVP:
class Sql(Base):
__tablename__ = 'Sql'
id: Mapped[int] = mapped_column(primary_key=True)
name: Mapped[str] = mapped_column("user_name", key="name")
@dataclass
class Dt:
id: int
name: str
m2e = get_converter(Sql, Dt)
print(m2e(Sql(
id=1,
name="Test"
)))