Skip to content
Discussion options

You must be logged in to vote

you can't use Column in a parent class that is used by several tables because it will instantiate the column and the instance of a column cannot be used multiple times.

So replace that line:

id :int = Field(description='id', title="id",sa_column=Column(BigInteger,primary_key=True))

with this:

id: int = Field(description='id', title="id", sa_type=BigInteger, primary_key=True)

Using sa_type (or sa_column_args or sa_column_kwargs) won't instantiate the column right away and so the problem won't occur.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by YuriiMotov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
2 participants