Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

insert DTO type ENUM as string occurred encode problem #24

Open
ColdeZhang opened this issue Apr 23, 2023 · 1 comment
Open

insert DTO type ENUM as string occurred encode problem #24

ColdeZhang opened this issue Apr 23, 2023 · 1 comment

Comments

@ColdeZhang
Copy link

I have a ENUM type as string, when I tried to insert it int to DB. Pg report an error "ERROR: invalid byte sequence for encoding "UTF8": 0x00"

It seems like oat++'s ENUM::String have an "\0" at the end of String, but PG's encoding doesn't recognized this char.

One noob solution of this problem is replace "\0" to "" at every String, but I am wondering if there is some more proper solution?

@EnderTheCoder
Copy link

I have the same problem. Has this been fixed?

bwengert79 added a commit to bwengert79/oatpp-postgresql that referenced this issue Oct 1, 2024
bwengert79 added a commit to bwengert79/oatpp-postgresql that referenced this issue Oct 1, 2024
issue oatpp#24 - insert DTO type ENUM as string
Include test case EnumAsStringTest
lganzzzo added a commit that referenced this issue Oct 9, 2024
Issue #24 - insert DTO type ENUM as string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants