Skip to content

Conversation

@stefanotroncaro
Copy link
Contributor

Session.query has been deprecated as of sqlalchemy v2, see the migration guide for context.

Refactored the BaseRepository.list method that used Query objects to use the preferred Select object.

I tested manually with various use cases to verify it works. I can write automated tests for the BaseRepository if its preferred, just leave a comment.

@stefanotroncaro stefanotroncaro changed the title refactor: base_repository.list to use Select instead of deprecated Query refactor: BaseRepository.list to use Select instead of deprecated Query Apr 4, 2025
@stefanotroncaro stefanotroncaro changed the title refactor: BaseRepository.list to use Select instead of deprecated Query Refactor BaseRepository.list method Apr 4, 2025
Copy link
Collaborator

@DanTcheche DanTcheche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!
Please refactor this in other repositories so it's fixed across the project.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants