URGENT RE: [Zope] ZmysqlDA

Oliver Marx oliver@tekk.dk
Wed, 29 May 2002 20:11:49 +0200


So the DA's are using the column names as id for objects?

Then problem only arises with a select * ... in other cases one could just
use
select table1.postal_id, table2.postal_id ...

problem gone!

But but but.....

ZmysqlDA should *not* abstruct the SQL92 definition...

\Oliver

>>-----Original Message-----
>>From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Andy
>>Dustman
>>Sent: 29. maj 2002 19:57
>>To: Zope@Zope. Org
>>Subject: Re: URGENT RE: [Zope] ZmysqlDA
>>
>>
>>On Wed, 2002-05-29 at 13:45, Andy Dustman wrote:
>>> On Wed, 2002-05-29 at 13:38, Chris McDonough wrote:
>>> > This has nothing to do with Zope other than the fact that you're
>>> > carrying out a SQL query via a ZSQL method.  This error message comes
>>> > from MySQL.  Apparently there's a problem with your syntax.
>>Maybe MySQL
>>> > doesn't support this statement?
>>>
>>> Actually, it does, or would, once he got past the duplicate column
>>> problem, since you can't return a column named id to Zope.
>>
>>In fact, upon further consideration, the duplicate column error really
>>is a Zope/ZMySQLDA error and not a MySQL error. ZMySQLDA (and likely
>>many other DAs) will raise an exception if the same column appears twice
>>in the result set. It's not possible to know (without parsing SQL) that
>>the two columns are the same. The old ZMySQLDA (1.x series) would return
>>all column names as table.col; the new one (2.x series) does not.
>>
>>--
>>Andy Dustman         PGP: 0x930B8AB6
>>    @       .net     http://dustman.net/andy
>>"Cogito, ergo sum." -- Rene Descartes
>>"I yam what I yam and that's all that I yam." -- Popeye
>>
>>
>>_______________________________________________
>>Zope maillist  -  Zope@zope.org
>>http://lists.zope.org/mailman/listinfo/zope
>>**   No cross posts or HTML encoding!  **
>>(Related lists -
>> http://lists.zope.org/mailman/listinfo/zope-announce
>> http://lists.zope.org/mailman/listinfo/zope-dev )