-
Notifications
You must be signed in to change notification settings - Fork 26
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
Issue #24 - insert DTO type ENUM as string #29
Conversation
Update to oatpp 1.4.0
issue oatpp#24 - insert DTO type ENUM as string Include test case EnumAsStringTest
Hey @bwengert79 , Let's try to run CI: |
Version two of the Docker Compose is invoked via docker compose Removed hyphen from docker-compose
Got past the docker compose issue. |
Changing cmake min to 3.1 got us further in the build process. However, the next stumbling block is oatpp 140 is not available in the current CI environment. Perhaps this PR needs to wait for the CI environment to match that of oatpp 140. |
Hey @bwengert79 , Yes, the current implementation of CI pipeline is outdated and isn't flexible. |
Issue #24
When serializing a DTO that contains a DTO_FIELD whose type is
Enum<xxx>AsString
, the resulting string ultimately goes out of scope. This will result in a failure when trying to insert this type of value into a database.The solution is to utilize Serializer::OutputData::databuffer. Before the enum string goes out of scope, allocate a dataBuffer and copy the value to it.
EnumAsStringTest is included as a unit test.
If you run the unit test before applying the Serializer change you can see the failure take place.
Regarding Oatpp 1.4.0
My environment is set up using Oatpp 1.4.0.
I updated oatpp-postresql to 1.4.0 to explore.
I then discovered issue #24 and created the solution in the 1.4.0 environment.