Project

General

Profile

Actions

Bug #826

closed

Postgres backend does not work for boolean types

Added by Kurt Roeckx over 13 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
Start date:
05/15/2011
Due date:
% Done:

0%

Estimated time:

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

Actions #1

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

Actions #2

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

Actions #3

Updated by Koen Deforche over 13 years ago

  • Target version set to 3.1.10
Actions #4

Updated by Koen Deforche over 13 years ago

  • Status changed from Resolved to Closed
Actions #5

Updated by Ariel Kruger almost 11 years ago

I am still having problem with this...

Can anyone check if the problem still exist?

Actions #6

Updated by Ariel Kruger almost 11 years ago

sorry, it was a mistake of mine...

It is working perfectly

Actions

Also available in: Atom PDF