#2386: AttributeError when mapping a subclass with database.session_mapper
------------------------+---------------------------------------------------
 Reporter:  chrisz      |       Owner:                           
     Type:  defect      |      Status:  new                      
 Priority:  high        |   Milestone:  1.1.x bugfix             
Component:  SQLAlchemy  |     Version:  1.1                      
 Severity:  major       |    Keywords:  sqlalchemy session mapper
------------------------+---------------------------------------------------
 When using the new database.session_mapper mapping an old-style class or a
 class that has already an `__init__` method, you will get an Attribute
 error. This is because database.create_session_mapper directly checks
 `__init__` and `__init__._session_mapper` which are not available in this
 cases; getattr() should be used here (see also bug report
 [http://groups.google.de/group/turbogears/browse_thread/thread/1f551664886208f2
 here]).

 Also, similar to SQLAlchemy, database.create_session_mapper should have a
 keyword option `set_kwargs_on_init=True` for suppressing this feature.

-- 
Ticket URL: <http://trac.turbogears.org/ticket/2386>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to