-
Notifications
You must be signed in to change notification settings - Fork 10
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
SQLAlchemy 1.4 #54
Conversation
src/pypnnomenclature/models.py
Outdated
@@ -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 |
There was a problem hiding this comment.
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é.
There was a problem hiding this comment.
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...
src/pypnnomenclature/models.py
Outdated
@@ -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", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overlaps="nomenclature_type,nomenclatures", | |
viewonly=True, |
There was a problem hiding this comment.
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 ?
Codecov ReportAttention:
... and 1 file with indirect coverage changes 📢 Thoughts on this report? Let us know! |
No description provided.