| sys:1: SAWarning: relationship 'Event.accounts' will copy column accounts.id to column account_event_association.account_id, which conflicts with relationship(s): 'Account.event_associations' (copies accounts.id to account_event_association.account_id), 'AccountEventAssociation.account' (copies accounts.id to account_event_association.account_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="account,event_associations"' to the 'Event.accounts' relationship. (Background on this warning at: https://sqlalche.me/e/20/qzyx) (This warning originated from the `configure_mappers()` process, which was invoked automatically in response to a user-initiated operation.)
web | sys:1: SAWarning: relationship 'Event.account_associations' will copy column events.id to column account_event_association.event_id, which conflicts with relationship(s): 'Account.events' (copies events.id to account_event_association.event_id), 'Event.accounts' (copies events.id to account_event_association.event_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="accounts,events"' to the 'Event.account_associations' relationship. (Background on this warning at: https://sqlalche.me/e/20/qzyx) (This warning originated from the `configure_mappers()` process, which was invoked automatically in response to a user-initiated operation.)
у меня выскакивают такие варнинги, которые говорят, что можно добавить overlaps или viewonly, когда я добавляю overlaps, то все действительно исчезает, это костыль или так можно делать? Как избежать этих варнингов?
я делал все как по доке указано
https://docs.sqlalchemy.org/en/20/orm/basic_relationships.html#combining-association-object-with-many-to-many-access-patterns
может есть что-то, что можно поменять?
Чел, это стену никто читать не будет. Либо выдели главное, либо залей хотя бы на пастебин
Обсуждают сегодня