On Aug 15, 1:05 am, Michael Bayer <mike...@zzzcomputing.com> wrote:

> A relationship() can be added at any time to any mapped class - when using 
> declarative config, just assigning it to the class is all that's needed, 
> mapper.add_property() is called as a result.     Using "backref" where you 
> had "back_populates" should also achieve the result of adding a 
> relationship().
>
> Otherwise if "extend" means "subclass", that's an option as well (though it 
> means you can't change your base class without risking backwards 
> incompatibility).

I couldn't subclass as I couldn't get the config object in order to
get my local class. backref did work well. I don't really want to
override AuthUser - the theory for this library is that the auth data
is not changed, but, users can locally define their own User Profile
that is linked via a foreign key. Updates to my library won't require
them to make changes to their table and it should eliminate migration
issues, etc.

I do thank you for your response - works like a charm. Also learned
quite a bit about mappers in the process which will fix another issue
I had in some unrelated code.

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to