- Notifications
You must be signed in to change notification settings - Fork 724
Replies: 3 comments · 2 replies
-
This is also an issue with |
Beta Was this translation helpful? Give feedback.
All reactions
0 replies
-
@gp1105739 Have you found a work around for this? |
Beta Was this translation helpful? Give feedback.
All reactions
0 replies
-
do: |
Beta Was this translation helpful? Give feedback.
All reactions
❤️ 1
2 replies
-
Hi @Zdong104, I'm facing the same even after updating packages. Can you take a look and suggest anything?
Dependencies:
|
Beta Was this translation helpful? Give feedback.
All reactions
👍 1❤️ 1👀 3
-
I'am also experiencing this issue only when using sqlalchemy and imperative mapper. :| |
Beta Was this translation helpful? Give feedback.
All reactions
👍 2
Sign up for free to join this conversation on . Already have an account? Sign in to comment
-
First Check
Commit to Help
Example Code
Description
We use sqlmodel and SQLAlchemy to define and save data models. When SQLAlchemy try to create an instance based on the query result, it calls new of ModelMetaclass. However, the new does not create pydantic_private when there is no private_attributes. It errors out when we try to compare objects by calling eq due to self.pydantic_private == other.pydantic_private . We get AttributeError object has no attribute 'pydantic_private'
It seems like some part of is missing in
SQLModelMetaclass.__new__
For example, in pydantic
BaseModel.model_construct
, there is a code block as following but it is missing fromSQLModelMetaclass.__new__
Operating System
Linux
Operating System Details
No response
SQLModel Version
0.0.14
Python Version
3.10
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions