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 warning #164

Closed
cphyc opened this issue Jan 14, 2022 · 1 comment
Closed

SQLAlchemy warning #164

cphyc opened this issue Jan 14, 2022 · 1 comment

Comments

@cphyc
Copy link
Contributor

cphyc commented Jan 14, 2022

Whenever I use tangos, the following warning is issued:

/home/ccadiou/codes/tangos/tangos/relation_finding/multi_hop.py:27:
SAWarning: relationship 'HaloLink.halo_to' will copy column halos.id
to column halolink.halo_to_id, which conflicts with relationship(s):
'Halo.all_reverse_links' (copies halos.id to halolink.halo_to_id),
'TimeStep.links_to' (copies halos.id to halolink.halo_to_id). If this
is not the intention, consider if these relationships should be linked
with back_populates, or if viewonly=True should be applied to one or
more if they are read-only. For the less common case that foreign key
constraints are partially overlapping, the orm.foreign() annotation
can be used to isolate the columns that should be written towards.  To
silence this warning, add the parameter
'overlaps="all_reverse_links,links_to"' to the 'HaloLink.halo_to'
relationship. (Background on this error at:
https://sqlalche.me/e/14/qzyx)

This is using the main version of tangos and sqlalchemy.__version__ == "1.4.27".

@apontzen
Copy link
Member

Addressed by #165

@cphyc cphyc closed this as completed Jan 31, 2022
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

No branches or pull requests

2 participants