sqlmodel icon indicating copy to clipboard operation
sqlmodel copied to clipboard

not autocompletion

Open me-v2 opened this issue 1 year ago • 1 comments

Privileged issue

  • [X] I'm @tiangolo or he asked me directly to create an issue here.

Issue Content

class SemanticChuck(SQLModel, table=True): """ """ id: int = Field(default=None, primary_key=True) chapter: str = Field(default="", index=True) article_ids: List[str] = Field(default=[], sa_column=Column(JSON)) explanation: str = Field(default="", nullable=True)

when db=SemanticChuck(type in here) not show field.

me-v2 avatar Aug 22 '24 07:08 me-v2

Still have this error when pydantic plugin is turn on

Image Image

On each version of PyCharm/SQLModel/Pydantic Plugin

Also noticed that under indexing autocomplete works

annotated-types==0.7.0
pydantic==2.5.3
pydantic_core==2.14.6
SQLAlchemy==2.0.41
sqlmodel==0.0.24
typing_extensions==4.14.0

Looks like this problem exists earlier: https://github.com/fastapi/sqlmodel/issues/483

molozeyWork avatar Jun 05 '25 11:06 molozeyWork

sqlmodel/main.py:477@__dataclass_transform__ -> @dataclass_transform https://github.com/fastapi/sqlmodel/discussions/1416

kssion avatar Jul 31 '25 07:07 kssion