URGENT RE: [Zope] ZmysqlDA

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


I'm not a novice when it comes to MySQL

http://www.mysql.com/doc/J/O/JOIN.html

select * from table1 left join table2 on table1.id=table2.id

Is valid MySQL-code... but ok id is reserved i Zope so i tried:

select * from table1 left join table2 on table1.postal_id=table2.postal_id

Still the same problem.

The cause must be that ZmysqlDA return column_name rather than
table.column_name.

I'm still very novice when it comes to Zope, but my guess is that Zope or
ZmysqlDA generates a list of object based on the result set using the column
names as id's if you have two columns with the same name there would be a
conflict.

\Oliver

>>-----Original Message-----
>>From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Jens
>>Vagelpohl
>>Sent: 29. maj 2002 19:43
>>To: Oliver Marx
>>Cc: Zope@Zope. Org
>>Subject: Re: URGENT RE: [Zope] ZmysqlDA
>>
>>
>>i don't think this has anything to do with zope or ZMySQLDA.
>>
>>you should read up on MySQL and especially about the SQL it uses.
>>
>>jens
>>
>>
>>On Wednesday, May 29, 2002, at 01:34 , Oliver Marx wrote:
>>
>>> How do you guys/girls do joins?
>>> Am I missing something about Zope?
>>>
>>> \Oliver
>>>
>>>>> -----Original Message-----
>>>>> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of
>>>>> Oliver Marx
>>>>> Sent: 29. maj 2002 19:18
>>>>> To: Zope@Zope. Org
>>>>> Subject: [Zope] ZmysqlDA
>>>>>
>>>>>
>>>>> select * from table1 left join table2 on table1.id=table2.id
>>>>>
>>>>> Error:
>>>>> duplicate column name, id
>>>>>
>>>>> Is this an error or a feature?
>>>>>
>>>>> \Oliver
>>
>>
>>
>>_______________________________________________
>>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 )