Skip to content

Conversation

patrick91
Copy link
Contributor

@patrick91 patrick91 commented Oct 9, 2025

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_field is the Pydantic one and not the SQLModel one

EDIT: I guess this is not just about primary keys, but it's about any custom attribute used in SQLModel's Field :)

@patrick91 patrick91 force-pushed the 10-09-_fix_composite_primary_with_aftervalidator_annotated branch from 9b502f9 to 25d3e9c Compare October 9, 2025 22:29
@patrick91 patrick91 added the bug Something isn't working label Oct 9, 2025
@stickM4N
Copy link

stickM4N commented Oct 11, 2025

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.
It might be a bug on pydantic side like they had in v2.0.0 and corrected in v2.0.1
For now i suggest to fix the version pydantic~=2.11.10 that works just fine since it have not updated pydantic-core to support python3.14.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants