Bug #826
closedPostgres backend does not work for boolean types
0%
Description
Hi,
With a postgres backend with a true value in the database, I get false back.
I think the problem is this piece of code:
if (strcmp(v, "f") 0)
return 0;
else if (strcmp(v, \"t\") 0)
return 1;
I think it should set *value to 0 / 1 and return true.
I'm also not sure it's a good idea to rely on the output being "t" or "f".
Kurt
Updated by Kurt Roeckx over 13 years ago
Kurt Roeckx wrote:
With a postgres backend with a true value in the database, I get false back.
This is only the case for find. The class member will always be false.
In case of query or query<boost::optional > things work as expected.
I did not try a boost::optional inside a class.
Kurt
Updated by Koen Deforche over 13 years ago
- Status changed from New to Resolved
Hey Kurt,
Good observation. This has been fixed in git HEAD.
Regards,
koen
Updated by Koen Deforche over 13 years ago
- Status changed from Resolved to Closed
Updated by Ariel Kruger almost 11 years ago
I am still having problem with this...
Can anyone check if the problem still exist?
Updated by Ariel Kruger almost 11 years ago
sorry, it was a mistake of mine...
It is working perfectly