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

SQLAlchemy 1.4 #54

Merged
merged 4 commits into from
Dec 6, 2023
Merged

SQLAlchemy 1.4 #54

merged 4 commits into from
Dec 6, 2023

Conversation

bouttier
Copy link
Contributor

@bouttier bouttier commented Nov 9, 2023

No description provided.

@@ -47,7 +47,9 @@ class TNomenclatures(db.Model):
id_type = db.Column(
db.Integer, ForeignKey("ref_nomenclatures.bib_nomenclatures_types.id_type")
)
nomenclature_type = relationship("BibNomenclaturesTypes", backref="nomenclatures")
nomenclature_type = relationship(
"BibNomenclaturesTypes", backref="nomenclatures", foreign_keys=id_type
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pourquoi est-il nécessaire de préciser la foreign key ? Il n’y a qu’une FK vers BibNomenclaturesTypes donc pas d’ambigüité.

Copy link
Contributor

Choose a reason for hiding this comment

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

Dans mes souvenirs, c'était la procédure à suivre pour résoudre un warning. Mais je suis d'accord, normalement, ce n'est pas nécessaire...

@@ -140,6 +140,7 @@ class BibNomenclaturesTypeTaxo(BibNomenclaturesTypes):
primaryjoin="and_(TNomenclatureTaxonomy.id_type == BibNomenclaturesTypes.id_type, TNomenclatureTaxonomy.active == True)",
lazy="joined",
order_by="TNomenclatureTaxonomy.hierarchy",
overlaps="nomenclature_type,nomenclatures",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
overlaps="nomenclature_type,nomenclatures",
viewonly=True,

Copy link
Contributor

Choose a reason for hiding this comment

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

viewonly à le même effet que l'overlaps ?

Copy link

codecov bot commented Nov 10, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Files Coverage Δ
src/pypnnomenclature/models.py 93.91% <33.33%> (ø)

... and 1 file with indirect coverage changes

📢 Thoughts on this report? Let us know!

@jacquesfize jacquesfize merged commit 4125f81 into develop Dec 6, 2023
4 of 6 checks passed
@bouttier bouttier deleted the feat/update-dependencies branch December 21, 2023 12:34
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