summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/functions.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-10-13 16:42:32 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2013-10-13 16:42:32 -0400
commitf00544a589d5002ddf0146706c4ba67509452ea7 (patch)
treec9d03d4aefbc93dd3e010d33a1add2912146e4e9 /lib/sqlalchemy/sql/functions.py
parent366e74b1bef36d384da4da8ff68751d68ba078f6 (diff)
downloadsqlalchemy-f00544a589d5002ddf0146706c4ba67509452ea7.tar.gz
- Added new option to :func:`.relationship` ``distinct_target_key``.
This enables the subquery eager loader strategy to apply a DISTINCT to the innermost SELECT subquery, to assist in the case where duplicate rows are generated by the innermost query which corresponds to this relationship (there's not yet a general solution to the issue of dupe rows within subquery eager loading, however, when joins outside of the innermost subquery produce dupes). When the flag is set to ``True``, the DISTINCT is rendered unconditionally, and when it is set to ``None``, DISTINCT is rendered if the innermost relationship targets columns that do not comprise a full primary key. The option defaults to False in 0.8 (e.g. off by default in all cases), None in 0.9 (e.g. automatic by default). Thanks to Alexander Koval for help with this. [ticket:2836]
Diffstat (limited to 'lib/sqlalchemy/sql/functions.py')
0 files changed, 0 insertions, 0 deletions