hi,

I have an app that should run both on postgresql and mssql. (The client
moves its applications one-by-one to postgres.) Some parts of the app query
several databases, in Postgres I've solved this problem using schemas, but I
have problems with mssql.

I use Session.configure(binds=db_bindings) to get several schemas/databases
in the session.

finally I call:

session.query(metamob.Machines.id, metamob.Machines.name).join((power.
MachineSignalSources, power.MachineSignalSources.machine_id==
metamob.Machines.id
)).all()

in postgresql this generates a proper join between the two schemas, but in
mssql I get a simple one-db join (cbomasini is metamob.Machines, and
idautomatuilaje is power.MachineSignalSources:
SELECT cbomasini.[ID] AS [cbomasini_ID], cbomasini.[Den umire] AS
[cbomasini_Denumire] \nFROM cbomasini JOIN idautomatutilaje ON idautom
atutilaje.[IDUtilaj] = cbomasini.[ID]

I'm using the pyodbc drivers for mssql.

Viktor

-- 
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.

Reply via email to