Closed iTanken closed 6 months ago
I test your code and this is the failure message i got
[71.420ms] [rows:1] SELECT * FROM "test_user" WHERE "test_user"."uid" = 'U0'
issue_498_test.go:135: gotUser Result: {"id":1,"uid":"U0","name":"someone","account":"guest","password":"MAkOvrJ8JV","email":"","phoneNumber":"+8618888888888","sex":"1","userType":1,"enabled":true,"remark":"Ahmad","AddNewColumn":"AddNewColumnValue","CommentSingleQuote":"CommentSingleQuoteValue"}
issue_498_test.go:138: wantUser Info: {"id":0,"uid":"U0","name":"someone","account":"guest","password":"MAkOvrJ8JV","email":"","phoneNumber":"+8618888888888","sex":"1","userType":1,"enabled":true,"remark":"Ahmad","AddNewColumn":"AddNewColumnValue","CommentSingleQuote":"CommentSingleQuoteValue"}
when i return to database I find Id = 1 not 0
so you need to change want_user.id
to be 1
not 0
and test again
sorry I use older version of your package I will update and test again
This is the issue
INSERT INTO "test_user" ("uid","name","account","password","email","phone_number","sex","birthday","user_type","enabled","remark","add_new_column","comment_single_quote") VALUES ('U0','someone','guest','MAkOvrJ8JV','','+8618888888888','1',NULL,1,1,'Ahmad','AddNewColumnValue','CommentSingleQuoteValue') /*--*/RETURNING "id" INTO '{{} 0xc000306398 false}' /*-sql.Out{}-*/
the main word that make this issue
/*--*/RETURNING
my code is expecting --
as line comment and not check if it is inside comment or not
so I fix the issue and I will released it soon
Thank you very much ❤
fixed in v2.8.7
v2.8.6
test got error:
error: received code 1 during response reading; driver: bad connection
https://github.com/godoes/gorm-oracle/actions/runs/7523949887/job/20478022641
https://github.com/godoes/gorm-oracle/blob/d6ae1919c220d8758a463ac25f864e256ac8576f/migrator_test.go#L78-L81
v2.8.5
test success.
https://github.com/godoes/gorm-oracle/actions/runs/7524219720/job/20478704507