cascade_mappers is a pretty flawed function which doesnt do a very  
good job of guessing what relationships you really want (i.e. cant do  
one-to-one, self referential, etc.), and its not in the docs for  
0.2.  its probably not working because while it didnt change,  
everything else did :) .
ive committed a fix for the specific problem youre having in the  
trunk revision 1600, but i dont have a unit test for this so i dont  
know if it totally works.  it would be helpful if you could submit a  
succinct testcase that I can add to the unit tests.


On Jun 7, 2006, at 4:10 PM, Valentin Kuznetsov wrote:

> 2006-06-07 16:06
>
> Hi,
> once I switched from 0.1.7 to 0.2.2 I found many problems which I'm  
> gradually
> trying to resolve in favor of new interface. The one which stuck me is
> cascade_mappers. Here is snippet of code which worked under 0.1.7:
>
>        map_tpr = mapper(T_PROCESSING,t_processing)
>        processingName     = processing['processingName']
>        map_tpn = mapper(T_PROCESSING_NAME,t_processing_name)
>        cascade_mappers(map_tpn,map_tpr)
>
> where lower case t_XXX are the tables and upper case T_XXX are the  
> classes.
> So, with new version I got that following error:
>
>   File "/home/vk/CMS/DBS/work/prototype/DBSSchema/DBSManager.py",  
> line 561, in
> createProcessing
>     cascade_mappers(map_tpn,map_tpr)
>   File "/home/vk/CMS/DBS/work/prototype/DBSSchema/__init__.py",  
> line 108, in
> cascade_mappers
>
>   File "build/bdist.linux-i686/egg/sqlalchemy/orm/mapper.py", line  
> 885, in
> __getattr__
> AttributeError: table
>
> I've compared orm/__init__.py (v0.2.2) with mapping/__init__.py  
> (v0.1.7) code
> and looks like cascade_mappers functions are the same.
>
> Some help, explanation, would be helpfull.
> Thanks,
> Valentin.
>
>
> _______________________________________________
> Sqlalchemy-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users



_______________________________________________
Sqlalchemy-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to