db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Age Mooy" <am...@home.nl>
Subject [patch] Object.vm special import statements
Date Wed, 02 Apr 2003 08:19:15 GMT
Hi,

I am using the Torque generator with an external schema inclusion and
seperate packages for the target schema and the external schema. That
situation activates a part of Object.vm that is not often used I guess. The
below patch adds an extra check to prevent importing a Manager class is you
haven't activated Manager support. Another solution would be to just remove
the Manager import line because it is not used anywhere in the generated
source.

Age


Index: src/generator/src/templates/om/Object.vm
===================================================================
RCS file:
/home/cvspublic/db-torque/src/generator/src/templates/om/Object.vm,v
retrieving revision 1.2
diff -u -r1.2 Object.vm
--- src/generator/src/templates/om/Object.vm	23 Feb 2003 14:44:06 -0000	1.2
+++ src/generator/src/templates/om/Object.vm	2 Apr 2003 08:13:09 -0000
@@ -43,8 +43,10 @@

    #if ($tblFK.Package != $package)
 import ${tblFK.Package}.${className};
+import ${tblFK.Package}.${className}Peer;
+      #if ($useManagers)
 import ${tblFK.Package}.${className}Manager;
-import ${tblFK.Package}.${tblFK.JavaName}Peer;
+      #end
    #end
 #end




Mime
View raw message