Ignore:
Timestamp:
23/12/11 15:20:16 (8 years ago)
Author:
mnagni
Message:

Works fine but I have to find a way to initialize the python classes attributes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • mauRepo/xmi2sqlalchemy/trunk/src/main/resources/global_library.vm

    r8040 r8041  
    3333#set ($ft = $relation.fromTable.associatedClass.name) 
    3434#set ($tmn = $tableModel.associatedClass.name) 
    35 #if ($relation.isManyToMany()) 
     35#if ($relation.isManyToMany() && !$relation.useList) 
    3636'${relation.name}': relationship(${tt},  
    3737secondary=${tt.toLowerCase()}_${ft.toLowerCase()}_table 
     
    4949#end 
    5050#if($relation.isOneToMany()) 
    51 , primaryjoin=${tt.toLowerCase()}_table.c.${ft.toLowerCase()}_${relation.name}==${tmn.toLowerCase()}_table.c.id 
     51, primaryjoin=${tt.toLowerCase()}_table.c.${ft.toLowerCase()}_${relation.name.toLowerCase()}==${tmn.toLowerCase()}_table.c.id 
    5252#end 
    53 #if($relation.isOneToOne()) 
    54 , primaryjoin=${tt.toLowerCase()}_table.c.${ft.toLowerCase()}_${relation.name}_id==${tmn.toLowerCase()}_table.c.id 
     53#if($relation.isOneToOne() || !$relation.useList) 
     54, primaryjoin=${tt.toLowerCase()}_table.c.${ft.toLowerCase()}_${relation.name.toLowerCase()}_id==${tmn.toLowerCase()}_table.c.id 
    5555#end 
    5656)#end 
Note: See TracChangeset for help on using the changeset viewer.