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

FirstOrCreate Method Does Not Return Result with RowsAffected #1196

Open
doraemonkeys opened this issue Aug 24, 2024 · 0 comments
Open

FirstOrCreate Method Does Not Return Result with RowsAffected #1196

doraemonkeys opened this issue Aug 24, 2024 · 0 comments

Comments

@doraemonkeys
Copy link

Your Question

The FirstOrCreate method in Gorm Gen does not return the result object, which prevents accessing RowsAffected. The documentation suggests that FirstOrCreate should return the count of rows affected, but the actual method signature is:

FirstOrCreate() (*model.Email, error)

How can I access RowsAffected with the current method signature?

The document you expected this should be explained

I expected this to be explained in the Gorm Gen FirstOrCreate.

Expected answer

I would like guidance on how to retrieve RowsAffected or a method update to include this information.

Thank you!

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

1 participant