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

Many warnings with SQLAlchemy 1.4 #236

Open
7Z0t99 opened this issue Aug 1, 2024 · 1 comment
Open

Many warnings with SQLAlchemy 1.4 #236

7Z0t99 opened this issue Aug 1, 2024 · 1 comment

Comments

@7Z0t99
Copy link

7Z0t99 commented Aug 1, 2024

I have just updated to piecash 1.2.1 and SQLAlchemy 1.4 and see many warnings, e.g.

piecash\core\session.py:442: SAWarning: relationship 'Account.slots' will copy column accounts.guid to column slots.obj_guid, which conflicts with relationship(s): 'Slot.parent' (copies slots.guid_val to slots.obj_guid), 'SlotFrame.slots' (copies slots.guid_val to slots.obj_guid). 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="parent,slots"' to the 'Account.slots' relationship. (Background on this error at: https://sqlalche.me/e/14/qzyx)
  for v in s.query(Version).all()

The other warnings all look similar to this one, but with other relationships. Is it safe to ignore these warnings? How difficult would it be to fix the warnings?

@rhydlewis
Copy link

See this this Stack Overflow query on how to ignore these warnings in your code

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