XORM not holding onto modified TableName for struct after initial sync #1488
Labels
No Label
backport/done
backport/v1
blocked
db
oracle
db
sqlserver
duplicate
feature
cache
frontport/done
frontport/main
invalid
kind
breaking
kind
bug
kind
build
kind
dependencies
kind
docs
kind
driver
kind
enhancement
kind
feature
kind
performance
kind
proposal
kind
question
kind
refactor
kind
testing
need
feedback
need
test
proposal:accepted
RaspBerry Pi
regression
skip-changelog
upstream
wip
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: xorm/xorm#1488
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Please see https://play.golang.org/p/FB_X2Gm0R2k for example.
During the operation of the above code, the table is created as expected. However, once the data is marshalled into the table it fails to keep the correct table name.
Expected:
dbEngine.Sync creates the tablename as defined in TableName() method for the struct and marshals the data into the tablename as defined in TableName method for the struct.
Actual:
dbEngine.Sync creates the tablename as defined in TableName() method for the struct, but tries to marshal the data into tablename defined by the struct name alone. It then fails as the table is not created.
Any help you could provide would be fantastic.
Thanks
Same with "xorm.io/xorm" import
https://play.golang.org/p/Ow7vMJ0S7_p
Hi, please use
Sync2
,Sync
has been deprecated.Thank you for the quick response.
Same issue is still occurring though
➜ go run .
StartHere 1Here 2Here 3Here 4panic: mssql: Invalid object name 'sample_total_blocked_by_ip'.
goroutine 1 [running]:
main.main()
/Users/80087228/go/src/local_testing/structs/test/main.go:60 +0x7b1
exit status 2
And could you try
Awesome! Thanks for the help. That fixed it right up!