Just curious, why it doesn't propagate to subclasses automatically, it 
seems so natural for me ... ?

Another question, I use properties (property()) for all my class 
attributes If I redefine a mapper on the News class do I have to specify 
all the properties (properties = { ... }) again ?

Thanks,
Julien

Michael Bayer wrote:
> the assignment of mappers doesn't automatically propigate to  
> subclasses, as youre doing in that example.  youd have to  
> specifically make a mapper for the News class.
>
> On Nov 14, 2006, at 9:42 AM, Julien Cigar wrote:
>
>   
>> Hello list,
>>
>> I just started to use the assignmapper extension, here is my code :
>> http://rafb.net/paste/results/7gs8j757.html
>>
>> The problem I have is described on the rafb paste.
>>
>> Another problem I have is that I wondered where's the good place to
>> define the mappers, tables, ... in a MVC model ? I have the impression
>> that sometimes my classes are not properly initialized. At the  
>> moment I
>> have the following:
>>
>> the models in models/
>> the controllers in controllers/
>> the templates in views/
>>
>> all my models are in a separate file, for example news/news.py,
>> event/event.py, ... and all my mappers/tables are defined in
>> models/__init__.py, I do something like the following (for example):
>>
>> from application.models.news import NewsModel
>>
>> table_news = Table('news', meta, .......)
>> assign_mapper(session, table_news, NewsModel)
>>
>> Is it better to put everything in models/__init__.py  so that  
>> everything
>> is loaded at one time ?
>>
>> In advance thanks,
>>
>> Julien
>>
>> -- 
>> Julien Cigar
>> Belgian Biodiversity Platform
>> http://www.biodiversity.be
>> Université Libre de Bruxelles
>> Campus de la Plaine CP 257
>> Bâtiment NO, Bureau 4 N4 115C (Niveau 4)
>> Boulevard du Triomphe, entrée ULB 2
>> B-1050 Bruxelles
>> office: [EMAIL PROTECTED]
>> home: [EMAIL PROTECTED]
>>
>>
>>     
>
>
> >
>   


-- 
Julien Cigar
Belgian Biodiversity Platform
http://www.biodiversity.be
Université Libre de Bruxelles
Campus de la Plaine CP 257
Bâtiment NO, Bureau 4 N4 115C (Niveau 4)
Boulevard du Triomphe, entrée ULB 2
B-1050 Bruxelles
office: [EMAIL PROTECTED]
home: [EMAIL PROTECTED]


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"sqlalchemy" 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/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to