source: mauRepo/xmi2sqlalchemy/trunk/src/main/resources/velocity/python/association.vm @ 8393

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/xmi2sqlalchemy/trunk/src/main/resources/velocity/python/association.vm@8393
Revision 8393, 483 bytes checked in by mnagni, 8 years ago (diff)

Stable release 0.1.0

  • Property svn:executable set to *
Line 
1## association.vm
2#set ($rn = ${associationTable.rightTable.associatedClass.name.toLowerCase()})
3#set ($ln = ${associationTable.leftTable.associatedClass.name.toLowerCase()})
4#set ($totalName = "#associationTableName($associationTable)")
5
6${tab}${totalName}_table = Table('#associationTableName($associationTable)', metadata,
7${tab}${tab}Column('left_node_id', Integer, ForeignKey(${rn}_table.c.id)),
8${tab}${tab}Column('right_node_id', Integer, ForeignKey(${ln}_table.c.id))
9${tab})
Note: See TracBrowser for help on using the repository browser.