Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solve SQL Alchemy's warnings about absence of PlanoTrabalho in session #161

Merged
merged 3 commits into from
Jan 29, 2025

Conversation

augusto-herrmann
Copy link
Member

Fix #140

Solve SQL Alchemy's warnings about absence of PlanoTrabalho in session, in context of the relationship with Participante.

@augusto-herrmann
Copy link
Member Author

Decorre de uma mudança de comportamento no SQL Alchemy a partir da versão 2.0.

Da documentação:

An object that’s not associated with a Session, when assigned to an attribute or collection on a parent object that is associated with a Session, will be automatically added to that same Session. However, the same operation in reverse will not have this effect; an object that’s not associated with a Session, upon which a child object that is associated with a Session is assigned, will not result in an automatic addition of that parent object to the Session. The overall subject of this behavior is known as “cascade backrefs”, and represents a change in behavior that was standardized as of SQLAlchemy 2.0.

@augusto-herrmann augusto-herrmann merged commit 3b4611b into main Jan 29, 2025
1 check passed
@augusto-herrmann augusto-herrmann deleted the issue-140 branch January 29, 2025 21:19
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.

Corrigir a ausência do objeto PlanoTrabalho na sessão do SQLAlchemy
1 participant