Re: [Modeling-users] Double Result
Status: Abandoned
Brought to you by:
sbigaret
From: <Jer...@fi...> - 2003-07-31 00:14:29
|
On Wednesday 30 July 2003 22:50, Sebastien Bigaret wrote: > So J=E9r=F4me was right and what we have here is not a mysql bug at all > --it's the way SQL behaves: all JOIN results in a cartesian product so > we can get duplicates. I don't know how many times I've forgotten that, > but I bet it's not the last one :/ For details, see for example: > http://developer.postgresql.org/docs/postgres/sql-select.html > > =3D> the bug is in the SQL generated by the framework itself. It makes it > possible to get duplicates in the result set returned by > EditingContext.fetch(). > > You'll find attached a simple patch solving the problem. I won't have > the time to make a new release this evening, and probably not before > the week-end. I plan to do it not latter than sunday evening. > > Regards, > > -- S=E9bastien. > > > ------------------------------------------------------------------------ > --- SQLExpression.py 24 Jul 2003 12:07:25 -0000 1.19 > +++ SQLExpression.py 30 Jul 2003 20:36:34 -0000 > @@ -491,7 +491,7 @@ > lockClause): > """ > """ > - statement=3DselectString or 'SELECT ' > + statement=3DselectString or 'SELECT DISTINCT ' > statement+=3DcolumnList > statement+=3D' FROM '+tableList > if lockClause: > ------------------------------------------------------------------------ I'm thinking that you really need to check this carefully since sometimes we don't want to use disctinct, no ? hum deleting or count may have the same trouble no ?=20 I haven't work w/ modeling since 5 months right now so I may say wrong=20 things .. pay caution Bye Bye |