Am 13.06.2013, 21:20 Uhr, schrieb Andy <[email protected]>:
It's the original issue. The relation (that I want the ORM to see) isn't
what's literally set in the schema by foreign keys, and the
primaryjoin/foreign_keys ORM magic for this IMO sucks. Something like
"onetomany" and "manytoone" in the mapper config would solve the problem
nicely.
Can't you make the join condition explicit? I seem to remember doing
something like that recently. I don't like relying on magic ever but I do
think that SQLAlchemy does a really excellent job in most situations. In
others, I think you can use SQL Expressions as Mike has recently indicated
on another thread. My big point is that people using databases have to be
prepared to find out how to get the best use of them and that often means
writing out a query in SQL first and then writing it in SQLAlchemy.
Well, yes, I'd always recommend Postgres over MySQL but I don't see what
the choice of backend has to do with this problem, except how well
reflection works with Postgres. From a developer's perspective MySQL's
biggest problem, apart from MyASM, is that its behaviour can be
unpredictable.
The MySQL vs PostgreSQL holy war is completely irrelevant to this issue
Indeed, but you started it! ;-)
Charlie
--
Charlie Clark
Managing Director
Clark Consulting & Research
German Office
Kronenstr. 27a
Düsseldorf
D- 40217
Tel: +49-211-600-3657
Mobile: +49-178-782-6226
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.