On Oct 12, 2010, at 7:58 AM, Christian Démolis wrote: > Hello, > > I actually try to migrate to SqlAlchemy 0.6.4 (before i was in 0.5.2) > One of my query seems to not work properly in this new version > It seems to be a bug in Sql Alchemy because of this part of my query > "model.Collaborateur.LesIns.any(model.or_(model.Instruction.FinValidite>time.time(), > model.Instruction.FinValidite==None))" > All the field which are after this part seems to be corrupted > the n+1 field seems to return the result of the n field > n+2 field return the result of n+1 field... > > s = model.session.query(model.Collaborateur.IdCollaborateur, > model.Collaborateur.Nom, model.Collaborateur.Prenom, > model.Collaborateur.Type, model.Collaborateur.Civilite, > model.Collaborateur.Titre, model.Collaborateur.Inactif, > model.Collaborateur.MotCle, model.Collaborateur.IdProfilIca , > model.Collaborateur.Responsable, > model.Collaborateur.LesIns.any(model.or_(model.Instruction.FinValidite>time.time(), > model.Instruction.FinValidite==None)), model.Collaborateur.TypeEnvoi, > model.Collaborateur.Fonction ) > s = s.filter(model.Collaborateur.IdDossier==983) # On commence par > extraire de la bdd les collaborateurs qui font partie du dossier > for e in s: > print "Fonction", e.Fonction, "TypeEnvoi", e.TypeEnvoi > > > All works better when i put the green part at the end of the query (after the > red part) but i wonder why it works before in 0.5.2 and not in 0.6.4???
cant do much here without an illustration of the SQL that's generated, and most helpfully some runnable code that reproduces the issue. If the SQL itself is misformed, creating the offending query and calling str(q) is sufficient to demonstrate. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected]. 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.
