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

fix order-transaction one-to-one relation #106

Merged
merged 2 commits into from
May 2, 2021

Conversation

valentino-sm
Copy link
Contributor

fix sqlalchemy:latest warning:

SAWarning: relationship 'Order.transaction' will copy column orders.order_id to column transactions.order_id, which conflicts with relationship(s): 'Transaction.order' (copies orders.order_id to transactions.order_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.

@Steffo99 Steffo99 self-assigned this May 2, 2021
@Steffo99 Steffo99 self-requested a review May 2, 2021 02:24
Copy link
Owner

@Steffo99 Steffo99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good fix, but for more clarity I'd prefer if back_populates was used. :)

@valentino-sm valentino-sm requested a review from Steffo99 May 2, 2021 02:52
@Steffo99 Steffo99 merged commit 3272557 into Steffo99:master May 2, 2021
@valentino-sm valentino-sm deleted the patch-1 branch May 2, 2021 06:49
@valentino-sm valentino-sm restored the patch-1 branch May 2, 2021 17:57
@valentino-sm valentino-sm deleted the patch-1 branch May 2, 2021 17:58
@Steffo99 Steffo99 added the bug Something that doesn't work as expected. label May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that doesn't work as expected.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants