Oh doh...that is perfect!!!

Except for now, I either need to merge my __mapper_args__ from each table 
to my base __mapper_args__

Or is there a way to add to __mapper_args__ in the base DYNAMICALLY based 
on some property in the class?
That would mean I could automate the whole process..

Thanks so much for your help!
Dewey

On Thursday, December 11, 2014 1:20:34 PM UTC-6, Mariano Mara wrote:
>
>
>
> 2014-12-11 15:58 GMT-03:00 dewey <[email protected] <javascript:>>:
>>
>> I have some standard global (all tables) columns in my declarative base.
>>
>> But as a convention (and to support other patterns elsewhere), I need all 
>> of my actual DB column names to support a unique, per-table prefix.
>>
>>
> How about column_prefix? 
> http://docs.sqlalchemy.org/en/rel_0_9/orm/mapper_config.html#naming-all-columns-with-a-prefix
>  
>
>> So the declarative base (or mixin) specifies this:
>>    id = Column(Integer, primary_key=True, autoincrement=True)
>>
>>
>> And I want the resulting attribute and column name (for table use_user) 
>>  to be this:
>>
>>      use_id = Column(Integer, primary_key=True, autoincrement=True)
>>
>>
>> I suspect I'm getting into meta-class land here, and I'm willing to 
>> continue learning that option.
>> I'm just hoping someone can give me a push or booster-shot.
>>
>> Thanks,
>> Dewey
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "sqlalchemy" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/sqlalchemy.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to