Hi List,

I have a table of people,  one of Races and a RaceParticipant table that 
relate "people" to "races" and add a few extra info (e.g. Team, Weight, ...)

All this is working fine and thanks to the power of the ORM, I can do things 
like
        race.Racers
        people.Races

and get the right list.

Now I am trying to "fix" the race and try to retrieve only the people 
participating to the race.

What I have done is a create a function "fixRace". It takes a "race" as 
parameter and what it does is create a secondary mapper that is based on a 
query where the join is set properly. The mapper is then put in the "inRace" 
attribute of the "people" object.  My intention being to do things like

        session.query(people.inRace).select_by("Nationality"="Sweden")  

I did a test using the shell and it seemed to work... but in my Qt 
application... It does not... 

my questions are

        Event though my session is not flushed and only one thread at a time 
will 
        access the session, could this be a threading problem?

        Is there a better  way to do what I am trying to do?

Cheers,
        François 

--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to