Skip to content

Refactor BaseRepository.list method#17

Open
stefanotroncaro wants to merge 1 commit into
mainfrom
refactor/deprecated-query-to-select
Open

Refactor BaseRepository.list method#17
stefanotroncaro wants to merge 1 commit into
mainfrom
refactor/deprecated-query-to-select

Conversation

@stefanotroncaro

Copy link
Copy Markdown
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

@DanTcheche DanTcheche left a comment

Copy link
Copy Markdown
Collaborator

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.

2 participants