🐛 Fix composite primary with AfterValidator/Annotated#1602
🐛 Fix composite primary with AfterValidator/Annotated#1602patrick91 wants to merge 2 commits intofastapi:mainfrom
Conversation
9b502f9 to
25d3e9c
Compare
|
I have also being working on solving this and will make a PR solving the issue with the associated tests. I will link it here when its done. |
|
Inspired by your test - added a fix here: https://github.com/fastapi/sqlmodel/pull/1607/files |
|
@patrick91 @vimota |
The title is currently a lie :D but there's a test for what's broken, and I think it's because the FieldInfo we get in
get_column_from_fieldis the Pydantic one and not the SQLModel oneEDIT: I guess this is not just about primary keys, but it's about any custom attribute used in SQLModel's
Field:)