Struct field with jsonb and postgres #411
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
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: xorm/xorm#411
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?
Hello, I am having trouble using a struct as a field with jsonb. Take for example this struct:
When I try to insert something into this table, it seems to be trying to treat it as a foreign table not jsonb. I get the error "no primary key for col addr"
Am I doing something wrong, or is there a way to do this? Here is a full example for what I am talking about: https://gist.github.com/wrunk/f5d4d5d648e41292f24be4c9b678edd8
JSONB is not supported by xorm now.
Maybe it is worth noting that using a jsonb field as a slice of interface or a slice of struct works fine: