Project

General

Profile

Actions

Bug #1984

closed

QueryModel addColumn

Added by Ariel Kruger over 11 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
06/13/2013
Due date:
% Done:

0%

Estimated time:

Description

Hi, I am having some problems when adding columns to em QueryModel with postgres as backend...

for example...

my query is

  "SELECT cast(round(number, 2) as text) AS column_number FROM table"

then when I try to add

model->addColumn("column_number", "label");

I get the erro, could not find the field 'label'

I could get it working changing my query as follow

 "SELECT round(number, 2)::text AS column_number FROM table"

Thanks...any question I can put more code to explain...

Actions #1

Updated by Ariel Kruger over 11 years ago

Hi, I am having some problems when adding columns to a QueryModel with postgres as backend...

for example...

my query is

 "SELECT cast(round(number, 2) as text) AS column_number FROM table"

then when I try to add

model->addColumn("column_number", "label");

I get the erro, could not find the field 'column_number'

I could get it working changing my query as follow

 "SELECT round(number, 2)::text AS column_number FROM table" 

Thanks...any question I can put more code to explain...

Actions #2

Updated by Koen Deforche over 11 years ago

  • Status changed from New to Feedback
  • Assignee set to Koen Deforche
  • Target version set to 3.3.1

Hey,

That was some ... sloppy parsing. A fix is on its way!

Regards,

koen

Actions #3

Updated by Koen Deforche over 11 years ago

  • Status changed from Feedback to Implemented @Emweb
Actions #4

Updated by Koen Deforche over 11 years ago

  • Status changed from Implemented @Emweb to Resolved
Actions #5

Updated by Koen Deforche over 11 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF