We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have added the column 'created' to the table 'AppUser' in the example-postgresql
CREATE TABLE IF NOT EXISTS AppUser ( id varchar (256) PRIMARY KEY, username varchar (256) NOT NULL, email varchar (256) NOT NULL, password varchar (256) NOT NULL, role varchar (256) NULL, created timestamp DEFAULT now(), -- NEW COLUMN -- CONSTRAINT UK_APPUSER_USERNAME UNIQUE (username), CONSTRAINT UK_APPUSER_EMAIL UNIQUE (email) );
I have modified 'UserDto.hpp' to add the field as String DTO_FIELD(String, created, "created");
DTO_FIELD(String, created, "created");
but when I try to test the endpoint of getUserById to select some user, I get the following error
{ "status": "ERROR", "code": 500, "message": "[oatpp::postgresql::mapping::Deserializer::deserializeString()]: Error. Unknown OID." }
as I understand from the error message I have to perform a conversion type to take the timestamp value to string
How can I do this?
The text was updated successfully, but these errors were encountered:
Hello @quijos12 ,
You have to cast timestamp to string on PostgreSQL side, before returning DB result.
Please see this StackOverflow answer - https://stackoverflow.com/questions/15990344/select-date-timestamp-from-postgresql-as-string-char-beware-of-null-value
Sorry, something went wrong.
No branches or pull requests
I have added the column 'created' to the table 'AppUser' in the example-postgresql
I have modified 'UserDto.hpp' to add the field as String
DTO_FIELD(String, created, "created");
but when I try to test the endpoint of getUserById to select some user, I get the following error
as I understand from the error message I have to perform a conversion type to take the timestamp value to string
How can I do this?
The text was updated successfully, but these errors were encountered: