Gaetan de Menten wrote: >> from sqlalchemy.orm.mapper import global_extensions >> from elixir import objectstore >> global_extensions.append(objectstore.context.mapper_extension) > > Didn't know that trick. But this doesn't really help. We can simply > call the regular mapper() function with the session_context extension. > And while we are here, I'd like to provide an option to not use the > session_context extension at all.
Well, it certainly helps if you want to use the session_context extension. And it ensures that any additional mappers that are created in your code or in extensions respect and utilize the context. I like the idea to provide an option to not use the session_context extension for people who would like to do their own thing. >> Once this is done, we can return to using regular mapper() functions >> rather than assign_mapper, and all query operations can move to >> .query. > > Easy enough but what do we do with all those methods? I think we > should still provide those methods (with a deprecated warning), at > least for a few releases to provide for a nice upgrade path. What > about the methods which are also deprecated in Query (get_by, select, > ...)? Well, we could keep them around and proxy them through to the .query object and print out deprecation warnings, but I'd like to get rid of them totally in very short order. Personally, I don't have a problem with making this happen in 0.4, to coincide with the release of SQLAlchemy 0.4. It marks a nice clean break, where people are going to have to deal with SQLAlchemy API changes anyway. -- Jonathan LaCour http://cleverdevil.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "SQLElixir" 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/sqlelixir?hl=en -~----------~----~----~----~------~----~------~--~---
