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

Eager creation failure for associations #608

Open
xixinjie opened this issue Dec 4, 2020 · 0 comments
Open

Eager creation failure for associations #608

xixinjie opened this issue Dec 4, 2020 · 0 comments
Labels
f: associations the associations feature in pop s: triage Some tests need to be run to confirm the issue

Comments

@xixinjie
Copy link
Contributor

xixinjie commented Dec 4, 2020

Description

When try to use db.Eager().ValidateAndCreate(user) to create a user and underlying has_many books, it succeeded for the first time when books table is empty, but failed to save the books in following creations.

Steps to Reproduce the Problem

  1. Create new users and books tables
  2. Use db.Eager().ValidateAndCreate(user) to create first user and underlying has_many books: success
  3. Use db.Eager().ValidateAndCreate(user) to create more users and underlying has_many books: failure

Expected Behavior

Should always be able create the users and associated books via db.Eager().ValidateAndCreate(user)

Actual Behavior

It succeeded for the very first creation, but failed for following creations.

Info

OS: Mac
Pop: v5.3.1
Buffalo: N/A

More details could be found in the PR #607

@markbates @stanislas-m Could you pls review the PR?

@sio4 sio4 added s: triage Some tests need to be run to confirm the issue f: associations the associations feature in pop labels Sep 20, 2022
@sio4 sio4 added this to the v6.1.0 milestone Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
f: associations the associations feature in pop s: triage Some tests need to be run to confirm the issue
Projects
None yet
Development

No branches or pull requests

2 participants