Please do everyone else a favor and search around a little bit next
time.  This bug has already been reported a zillion times, and was
fixed weeks ago.

On Jan 21, 8:58 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> I'm having trouble making UPDATE queries in PostgreSQL. I know that
> there is a known issue about Postgres not supporting aliases in UPDATE
> queries. Anyway, my problem is that when I try to create new Aro like
> this:
>
>                 $parent = $this->Acl->Aro->findByAlias('SuperUser');
>                 $parentId = $parent['Aro']['id'];
>
>                 $this->Acl->Aro->create();
>                 $this->Acl->Aro->save(array(
>                         'foreign_key' => null,
>                         'parent_id' => $parentId,
>                         'alias' => 'User:30'));
>
> I get the following error:
>
> Warning (2): pg_query() [function.pg-query]: Query failed: ERROR:
> column "Aro" of relation "aros" does not exist
> LINE 1: UPDATE "aros" AS "Aro"  SET "Aro"."lft" = "Aro"."lft" + 2
> W...
>                                     ^ [CORE\cake\libs\model\datasources
> \dbo\dbo_postgres.php, line 123]
> $sql    =       "UPDATE "aros" AS "Aro"  SET "Aro"."lft" = "Aro"."lft" + 2
> WHERE "Aro"."lft" >=  '2'"
>
> I've already posted a bug to trac.cakephp.org... the reason for this
> message is that I would like to ask everybody for help on creating
> some quick solution or patch for this problem.
>
> P.S. This problem with aliases isn't just a one time thing, it is and
> will be happening until cakephp developers move the method
> renderStatement from dbo_source.php to each dbo file. It should work
> as it is, but it doesn't, they should all follow SQL standards but
> they don't. So, my suggestion is to make renderStatement in every dbo.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to