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.
array type insertion failing
A table created with a column which is an Array type does not seem to work with insertions. This PR shows a simple example of what can trigger this, (tested it manually on postgres).
Here is an error message i got on a minimal table setup:
GORM sent:
INSERT INTO "people" ("first_name","last_name","names") VALUES ('John','Doe',('John')) RETURNING "id"
You can correct this in one way by using curly braces around the array:
The correct way to insert:
Example of failure:
ps:
Since it does not work with insertions, unable to confirm whether this works for other operations, I would expect arrays to work though.