Re: [sqlalchemy] query .all and .count return different results when used with a subquery

2012-10-25 Thread Michael Bayer
On Oct 24, 2012, at 9:35 PM, dnathe4th wrote: I'm having a problem related to this as well. Is it possible for a join to get tripped up in the de-dup process or is that guaranteed to only occur for the mapper entity I query on? I am getting the de-duping if I query on the mapped entity,

Re: [sqlalchemy] query .all and .count return different results when used with a subquery

2012-10-24 Thread dnathe4th
I'm having a problem related to this as well. Is it possible for a join to get tripped up in the de-dup process or is that guaranteed to only occur for the mapper entity I query on? I am getting the de-duping if I query on the mapped entity, but if I query on the id of the entity I get the full

Re: [sqlalchemy] query .all and .count return different results when used with a subquery

2012-08-06 Thread kris
Well.. I can certainly understand why it's needed, but in my case I actually need to receive the two duplicate instances. Is there any way to remove this de-duplicate behavior or work around? -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To

Re: [sqlalchemy] query .all and .count return different results when used with a subquery

2012-08-06 Thread Michael Bayer
the uniquing logic is only enabled when you query for mapped entities, not individual columns, so from the Query the option would be to only query for individual columns. Query could be modified to allow a disabling option, though I wonder why exactly you'd need duplicate instances back. On

[sqlalchemy] query .all and .count return different results when used with a subquery

2012-08-03 Thread kris
SA 0.7.8 I am getting some strange results when using a subquery that returns Duplicate rows. Note in line 7 I am not using distinct, yet I get one object where I would expect 2. Also if I query.count I do actually receive 2. What's going on here? Thanks, kris vq1 =

Re: [sqlalchemy] query .all and .count return different results when used with a subquery

2012-08-03 Thread Michael Bayer
On Aug 3, 2012, at 3:22 PM, kris wrote: SA 0.7.8 I am getting some strange results when using a subquery that returns Duplicate rows. Note in line 7 I am not using distinct, yet I get one object where I would expect 2. Also if I query.count I do actually receive 2. What's going on