Thanks Niphlod,
I will give those suggestions a try when I am back in work tomorrow and let
you know how it went. My use of gluon is with PyQt so I don't think I could
package up an app at least not a minimal one without also providing all the
PyQt source for licensing reasons. But I could probably provide the table
definitions if it comes to that.
On Wednesday, 10 July 2013 15:32:40 UTC+1, Niphlod wrote:
>
> check the _select() to see what's going on. if you think the generated SQL
> is wrong, pack a MINIMAL app with test database records to show what you
> want to achieve with what you are starting from.
>
>
>
> Il giorno mercoledì 10 luglio 2013 15:22:00 UTC+2, Simon Carr ha scritto:
>>
>> The following code duplicate records based on the number of tables
>> referenced using with_alias. You see below that I have a reference to 5
>> tables which is resulting in every record being duplicated 5 times. If I
>> make a reference to a sixth table I get every record duplicated 6 times.
>>
>> Anu idwhat is going wrong.
>>
>> RSRisks = db(
>> (db.risks.user == userid)&
>> (db.risks.status == status)
>> ).select(
>> join = [db.teams.with_alias('team').on(db.teams.id == db.
>> risks.team).
>> db.users.with_alias('user').on(db.users.id == db.
>> risks.user).
>> db.users.with_alias('risk_owner').on(db.users.id
>> == db.risks.risk_owner).
>> db.platforms.with_alias('id_platform').on(db.
>> platforms.id == db.risks.id_platform).
>> db.contracts.with_alias('id_contract').on(db.
>> contracts.id == db.risks.id_contract).
>> db.suppliers.with_alias('id_supplier').on(db.
>> suppliers.id == db.risks.id_supplier)
>> ]
>> )
>>
>> Is this is a bug in gluon? or have I done something wrong in this code?
>>
>> Thanks
>> So,pm
>>
>
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.