Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Following discussion in #21, and possibly superseding #22.
Updates the return value of
create()
to be the created value rather than the number of updated rows. This is a breaking change, but it makes more sense given that the number modified would always have been 0 or 1 so it might as well give you the object if 1, or nothing if 0.If the model schema has an auto-incrementing primary key, the table is queried to find the last increment and that is used to return the object. If not, a standard primary key or unique constraint will be used. If neither of these exists in the schema the creation object itself will be used as criteria as a best-effort to return the created object.