Ignore:
Timestamp:
20/12/11 21:12:41 (8 years ago)
Author:
mnagni
Message:

Minimal difference with rev 8013

Location:
mauRepo/xmi2sqlalchemy/trunk/src/main/resources
Files:
3 edited

Legend:

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

    r8017 r8027  
    3939#set ($tmn = $tableModel.associatedClass.name) 
    4040#set ($totalName_1 = "${tt.toLowerCase()}_${ft.toLowerCase()}") 
    41 #set ($totalName_2 = "${ft.toLowerCase()}_${relation.name}") 
     41#set ($totalName_2 = "${ft.toLowerCase()}_${relation.name.toLowerCase()}") 
    4242#if ($relation.isManyToMany()) 
    4343'${relation.name}': relationship(${tt},  
    44 secondary=#truncate($totalName_1)_table 
    45 #if ($relation.backrefName), backref='_${relation.backrefName}' #end 
     44secondary=${totalName_1}_table 
     45#if ($relation.backrefName), backref='${relation.backrefName}' #end 
    4646#elseif($relation.isOneToMany()) 
    4747'${relation.name}': relationship(${tt} 
    4848#elseif($relation.isOneToOne()) 
    4949'${relation.name}': relationship(${tt}#end 
    50 #if($relation.isOneToOne() || $relation.doNotUseList) 
     50#if($relation.isOneToOne() || !$relation.isUseList()) 
    5151, uselist=False 
    5252#end 
     
    5656#end 
    5757#if($relation.isOneToOne() || $relation.isOneToMany()) 
    58 , primaryjoin=${tt.toLowerCase()}_table.c.#truncate($totalName_2)==${tmn.toLowerCase()}_table.c.${tmn.toLowerCase()}_id 
     58, primaryjoin=${tt.toLowerCase()}_table.c.${totalName_2}==${tmn.toLowerCase()}_table.c.${tmn.toLowerCase()}_id 
    5959#end 
    6060)#end 
  • mauRepo/xmi2sqlalchemy/trunk/src/main/resources/velocity/python/association.vm

    r8017 r8027  
    33#set ($ln = ${associationTable.leftTable.associatedClass.name.toLowerCase()}) 
    44#set ($totalName = "${rn}_${ln}") 
    5 #truncate($totalName)_table = Table('#truncate($totalName)', metadata, 
     5${totalName}_table = Table('${totalName}', metadata, 
    66${tab}Column('left_node_id', Integer, ForeignKey(${rn}_table.c.${rn}_id)), 
    77${tab}Column('right_node_id', Integer, ForeignKey(${ln}_table.c.${ln}_id)) 
  • mauRepo/xmi2sqlalchemy/trunk/src/main/resources/velocity/python/sqlAlchemyTables.vm

    r8017 r8027  
    2525#set ($fkName = ${foreignKey.tableModel.associatedClass.name.toLowerCase()}) 
    2626#set ($totalName = "${fkName}_${foreignKey.parentAttributeName.toLowerCase()}") 
    27 Column('#truncate($totalName)', Integer, ForeignKey('${fkName}.${fkName}_id'#checkUseAlter($foreignKey, $fkName))), 
     27Column('${totalName}', Integer, ForeignKey('${fkName}.${fkName}_id'#checkUseAlter($foreignKey, $fkName))), 
    2828#end 
    2929 
     
    5656${tab}#column($attribute) 
    5757#end 
    58 Column('t_type', String(30), nullable=False, default='${associatedCN}'), 
    5958${tab}extend_existing=False,) 
    6059#end 
Note: See TracChangeset for help on using the changeset viewer.