[sqlalchemy] Eager/joined loading of JTI models

2010-08-17 Thread flzz
I'm experiencing a behavior regarding the way lazy='joined' works on a JTI setup that is not totally clear to me. I have a basic JTI setup as follows from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import create_engine, Column, Integer, String, ForeignKey from

[sqlalchemy] Automatically merge a specific model/object

2010-08-09 Thread flzz
Greetings, I have an object model which I'm persisting with SQLAlchemy (0.6.3). I have a need for one of the objects in the model to always merge itself into the session when a new instance is added. For example, given sub = Subscription(email=EmailAddress(value='f...@bar.com)) which will