piecash icon indicating copy to clipboard operation
piecash copied to clipboard

Many warnings with SQLAlchemy 1.4

Open 7Z0t99 opened this issue 6 months ago • 1 comments

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?

7Z0t99 avatar Aug 01 '24 20:08 7Z0t99