fix: 🐛 embedded struct test failed with custom datatypes#6311
Merged
jinzhu merged 2 commits intogo-gorm:masterfrom May 15, 2023
Merged
Conversation
cd35429 to
f742914
Compare
Fix the pointer embedded struct within custom datatypes and *time.time should be nil issue.
f742914 to
1f76872
Compare
Contributor
Author
|
mssql will have type issue while inserting null value into /home/diad/Developer/hbs4/gorm/tests/embedded_struct_test.go:130 mssql: Implicit conversion from data type nvarchar to varbinary(max) is not allowed. Use the CONVERT function to run this query.
[16347.552ms] [rows:0] INSERT INTO "hn_posts" ("title","url","upvotes","user_id","user_name","user_email","user_age","user_content","user_content_ptr","user_birthday","user_birthday_ptr") OUTPUT INSERTED."id" VALUES ('embedded_pointer_type','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);reference https://stackoverflow.com/questions/11411854/implicit-conversion-from-data-type-nvarchar-to-varbinarymax-is-not-allowed |
change test cases from bytes to string to avoid mssql driver issue
Contributor
Author
|
commit dc149c1 |
a631807682
approved these changes
May 12, 2023
3 tasks
henryjcee
added a commit
to incident-io/gorm
that referenced
this pull request
Oct 8, 2024
… broken this for us and at least one other person.
jdon
pushed a commit
to incident-io/gorm
that referenced
this pull request
Jan 12, 2026
… broken this for us and at least one other person.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What did this pull request do?
Refer to #6288
Fix embedded struct with custom datatypes and *time.time will failed the test.
User Case Description
Test should pass.