Login | Register
My pages Projects Community openCollabNet

Discussions > dev > Re: Propel issues

propel
Discussion topic

Back to topic list

Re: Propel issues

Reply

Author hlellelid
Full name Hans Lellelid
Date 2008-05-29 07:12:41 PDT
Message Hi Andrejs,

On Thu, 29 May 2008 12:41:19 +0300, "Andrejs Verza"
<andrejs dot verza at gmail dot com> wrote:
> Hi Hans,
>
>
>
> Reporting that I cannot submit a bug report to the Proppel Trac.
>
> Everytime I try it throws me "a potential spam" message. Why so?

Sorry -- this is bad SPAM filtering by Trac. If you want to send me an
off-list request w/ desired username, I'll create a Trac account for you.
 
> The issue is that the latest SVN changes caused the following script to
> stop
> working:
>
>
>
> $criteria = new Criteria();
>
> $criteria->addAsColumn('c1', 'IF(' . VacancyPeer::PUBLISH_END_DATE . ' >
> CURRENT_DATE(), 0, 1)');
>
> $this->vacancies = VacancyPeer::doSelec​t($criteria);
>
>
>
> PropelExceptions is thrown.

There was a bug in Propel where it was not treating "as columns" as "select
columns" in the doSelect*() methods. I think this was an oversight, not
intended behavior.

See http://propel.phpdb.​org/trac/ticket/634

To solve your problem, you probably just need to explicitly add the select
columns to the Criteria:

VacancyPeer::addSele​ctColumns($c); // add the columns the object expects
$c->addAsColumn('c1', 'IF(' . VacancyPeer::PUBLISH_END_DATE . ' >
CURRENT_DATE(), 0, 1)'); // then add the "AS" column

Hans

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

Re: Propel issues hlellelid Hans Lellelid 2008-05-29 07:12:41 PDT
Messages per page: