[mysql] How to use generated UUID as id #1080
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#1080
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?
Hi,
i'm currently trying to use a UUID as id for my entity.
I want the database to create the UUID but it looks like this is not possible?
I'm using mysql so i guess a trigger should be created but i didn't found out how to do this.
At the moment i'm trying something like
but UUID are still not created..
Maybe you guys have any ideas how to achieve this?
Thanks
PS: maybe its related to #502
It didn't support mysql but postgres I think.
okay.. so i need to do a workaround like
???
Yeah, that works. And another way is that you could also add a mehtod to all your structs.
@lunny oh that looks way better than my hack :D
i will try this soon
thx
@lunny
okay yes it works and i ended up with
and
but i still need the workaround with the pointers for the insert statement..