[sqlalchemy] Re: Feature request: Session.get_local()

2007-03-20 Thread Daniel Miller
A patch containing tests and cleaned up identity key is attached. ~ Daniel Michael Bayer wrote: committed, r2409. the row needs to have a class and entity_name present to determine what mapper you want to use to extract from the row, so i put those as keyword arguments for now.

[sqlalchemy] Re: Feature request: Session.get_local()

2007-03-12 Thread Daniel Miller
Michael Bayer wrote: id rather not have people needing to deal with an actual identity key tuple most of the time. they should be able to say session.identity_map.something(class, pk) and get an instance out of it. What's the use of exposing the identity map if you don't want people to

[sqlalchemy] Re: Feature request: Session.get_local()

2007-03-10 Thread Daniel Miller
Michael Bayer wrote: my only concern is that you now have more than one way to do it. i need to deal with things in the identity map. do i go look at the session.identity_map ? (which is documented, its part of the public API) oh no, i dont have the exact kind of key to use, now i have to

[sqlalchemy] Re: Feature request: Session.get_local()

2007-03-09 Thread Michael Bayer
my only concern is that you now have more than one way to do it. i need to deal with things in the identity map. do i go look at the session.identity_map ? (which is documented, its part of the public API) oh no, i dont have the exact kind of key to use, now i have to go use a method called

[sqlalchemy] Re: Feature request: Session.get_local()

2007-03-08 Thread Michael Bayer
fine, but the name get_local is not so descriptive and also attracts the focus away from the existing identity_map accessor. how about we jack up the identity_map dictionary to be smarter ? so you could say: session.identity_map.find(class_, ident, entity_name='foo') On Mar 8, 10:07 am,