]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- session.get() and session.load() propigate **kwargs through to query
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 7 May 2007 00:40:41 +0000 (00:40 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 7 May 2007 00:40:41 +0000 (00:40 +0000)
CHANGES
lib/sqlalchemy/orm/session.py

diff --git a/CHANGES b/CHANGES
index 43c4ab88f554cd5d25c9b5955b1254a4d69f2a59..64f59d05c0cba1d47ba32a7a5c6db784fb3f7d46 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -10,6 +10,7 @@
     - many-to-many relationships check that the number of rows deleted
       from the association table by a delete operation matches the expected 
       results
+    - session.get() and session.load() propigate **kwargs through to query
 - mysql
     - support for column-level CHARACTER SET and COLLATE declarations,
       as well as ASCII, UNICODE, NATIONAL and BINARY shorthand.
index 1880e6062c73737995fed1a1e78ff0ac5c86bb8f..00ca7cde7862a2876f08f8b1a1366973cd80a399 100644 (file)
@@ -314,8 +314,8 @@ class Session(object):
         query.
         """
 
-        entity_name = kwargs.get('entity_name', None)
-        return self.query(class_, entity_name=entity_name).get(ident)
+        entity_name = kwargs.pop('entity_name', None)
+        return self.query(class_, entity_name=entity_name).get(ident, **kwargs)
 
     def load(self, class_, ident, **kwargs):
         """Return an instance of the object based on the given
@@ -332,8 +332,8 @@ class Session(object):
         query.
         """
 
-        entity_name = kwargs.get('entity_name', None)
-        return self.query(class_, entity_name=entity_name).load(ident)
+        entity_name = kwargs.pop('entity_name', None)
+        return self.query(class_, entity_name=entity_name).load(ident, **kwargs)
 
     def refresh(self, obj):
         """Reload the attributes for the given object from the