empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From benni...@apache.org
Subject svn commit: r1142243 - /incubator/empire-db/trunk/empire-db-codegen/src/main/resources/templates/Database.vm
Date Sat, 02 Jul 2011 16:23:04 GMT
Author: benniven
Date: Sat Jul  2 16:23:03 2011
New Revision: 1142243

URL: http://svn.apache.org/viewvc?rev=1142243&view=rev
Log:
This commit is for EMPIREDB-110:
- extended the database velocity template to generate the appropriate lines for table relations

Modified:
    incubator/empire-db/trunk/empire-db-codegen/src/main/resources/templates/Database.vm

Modified: incubator/empire-db/trunk/empire-db-codegen/src/main/resources/templates/Database.vm
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-codegen/src/main/resources/templates/Database.vm?rev=1142243&r1=1142242&r2=1142243&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-codegen/src/main/resources/templates/Database.vm (original)
+++ incubator/empire-db/trunk/empire-db-codegen/src/main/resources/templates/Database.vm Sat
Jul  2 16:23:03 2011
@@ -68,6 +68,11 @@ public class $dbClassName extends DBData
 	 * Default constructor for the $dbClassName.
 	 */
 	private ${dbClassName}() {
+#foreach ($relation in $database.relations)
+#foreach ($reference in $relation.references)
+		addRelation(${reference.sourceColumn.rowSet.name}.${parser.getAttributeName($reference.sourceColumn)}.referenceOn(${reference.targetColumn.rowSet.name}.${parser.getAttributeName($reference.targetColumn)}));
+#end
+#end
 	}
 	
 	#if($nestTables == true)



Mime
View raw message