You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by "Mojmir Hanes (JIRA)" <ji...@apache.org> on 2006/06/15 11:43:29 UTC

[jira] Created: (TORQUE-28) Generator doesn't generate correctly BaseXXXPeer.java files if property torque.subpackage.object is specified

Generator doesn't generate correctly BaseXXXPeer.java files if property torque.subpackage.object is specified
-------------------------------------------------------------------------------------------------------------

         Key: TORQUE-28
         URL: http://issues.apache.org/jira/browse/TORQUE-28
     Project: Torque
        Type: Bug

  Components: Generator  
    Versions: 3.2.1    
 Environment: All environments
    Reporter: Mojmir Hanes
    Priority: Minor


It seems torque generator incorrectly generates BaseXXXPeer 
      java sources if property torque.subpackage.object is specified.

Bug can be reproduced this way

1. set property torque.subpackage.object (for example 
torque.subpackage.object = object)
2. execute maven torque:om goal
3. examine generated BaseXXXPeer.java files. Look for lines

     /** A class that can be returned by this peer. */
     protected static final String CLASSNAME_DEFAULT =
         "${package}.${table}";

(instead of velocity variables package and table  you'll see substituted 
values, of course)

Correct lines should looks like

     /** A class that can be returned by this peer. */
     protected static final String CLASSNAME_DEFAULT =
         "${packageObject}.${table}";

Bug is in Torque templates module, in file 
templates/src/templates/om/Peer.vm

Here is patch

Best regards

Mojmir Hanes


Index: E:/Projekty/3rd-parties/Torque/templates/src/templates/om/Peer.vm
===================================================================
--- E:/Projekty/3rd-parties/Torque/templates/src/templates/om/Peer.vm	(revision 413121)
+++ E:/Projekty/3rd-parties/Torque/templates/src/templates/om/Peer.vm	(working copy)
@@ -125,7 +125,7 @@
 
     /** A class that can be returned by this peer. */
     protected static final String CLASSNAME_DEFAULT =
-        "${package}.$table.JavaName";
+        "${packageObject}.$table.JavaName";
 
     /** A class that can be returned by this peer. */
     protected static final Class CLASS_DEFAULT = initClass(CLASSNAME_DEFAULT);



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] Closed: (TORQUE-28) Generator doesn't generate correctly BaseXXXPeer.java files if property torque.subpackage.object is specified

Posted by "Thomas Vandahl (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/TORQUE-28?page=all ]

Thomas Vandahl closed TORQUE-28.
--------------------------------


> Generator doesn't generate correctly BaseXXXPeer.java files if property torque.subpackage.object is specified
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: TORQUE-28
>                 URL: http://issues.apache.org/jira/browse/TORQUE-28
>             Project: Torque
>          Issue Type: Bug
>          Components: Generator
>    Affects Versions: 3.2
>         Environment: All environments
>            Reporter: Mojmir Hanes
>         Assigned To: Thomas Fischer
>            Priority: Minor
>             Fix For: 3.3
>
>
> It seems torque generator incorrectly generates BaseXXXPeer 
>       java sources if property torque.subpackage.object is specified.
> Bug can be reproduced this way
> 1. set property torque.subpackage.object (for example 
> torque.subpackage.object = object)
> 2. execute maven torque:om goal
> 3. examine generated BaseXXXPeer.java files. Look for lines
>      /** A class that can be returned by this peer. */
>      protected static final String CLASSNAME_DEFAULT =
>          "${package}.${table}";
> (instead of velocity variables package and table  you'll see substituted 
> values, of course)
> Correct lines should looks like
>      /** A class that can be returned by this peer. */
>      protected static final String CLASSNAME_DEFAULT =
>          "${packageObject}.${table}";
> Bug is in Torque templates module, in file 
> templates/src/templates/om/Peer.vm
> Here is patch
> Best regards
> Mojmir Hanes
> Index: E:/Projekty/3rd-parties/Torque/templates/src/templates/om/Peer.vm
> ===================================================================
> --- E:/Projekty/3rd-parties/Torque/templates/src/templates/om/Peer.vm	(revision 413121)
> +++ E:/Projekty/3rd-parties/Torque/templates/src/templates/om/Peer.vm	(working copy)
> @@ -125,7 +125,7 @@
>  
>      /** A class that can be returned by this peer. */
>      protected static final String CLASSNAME_DEFAULT =
> -        "${package}.$table.JavaName";
> +        "${packageObject}.$table.JavaName";
>  
>      /** A class that can be returned by this peer. */
>      protected static final Class CLASS_DEFAULT = initClass(CLASSNAME_DEFAULT);

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] Updated: (TORQUE-28) Generator doesn't generate correctly BaseXXXPeer.java files if property torque.subpackage.object is specified

Posted by "Thomas Fischer (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/TORQUE-28?page=all ]

Thomas Fischer updated TORQUE-28:
---------------------------------

    Version: 3.2
                 (was: 3.2.1)

> Generator doesn't generate correctly BaseXXXPeer.java files if property torque.subpackage.object is specified
> -------------------------------------------------------------------------------------------------------------
>
>          Key: TORQUE-28
>          URL: http://issues.apache.org/jira/browse/TORQUE-28
>      Project: Torque
>         Type: Bug

>   Components: Generator
>     Versions: 3.2
>  Environment: All environments
>     Reporter: Mojmir Hanes
>     Priority: Minor
>      Fix For: 3.2.1

>
> It seems torque generator incorrectly generates BaseXXXPeer 
>       java sources if property torque.subpackage.object is specified.
> Bug can be reproduced this way
> 1. set property torque.subpackage.object (for example 
> torque.subpackage.object = object)
> 2. execute maven torque:om goal
> 3. examine generated BaseXXXPeer.java files. Look for lines
>      /** A class that can be returned by this peer. */
>      protected static final String CLASSNAME_DEFAULT =
>          "${package}.${table}";
> (instead of velocity variables package and table  you'll see substituted 
> values, of course)
> Correct lines should looks like
>      /** A class that can be returned by this peer. */
>      protected static final String CLASSNAME_DEFAULT =
>          "${packageObject}.${table}";
> Bug is in Torque templates module, in file 
> templates/src/templates/om/Peer.vm
> Here is patch
> Best regards
> Mojmir Hanes
> Index: E:/Projekty/3rd-parties/Torque/templates/src/templates/om/Peer.vm
> ===================================================================
> --- E:/Projekty/3rd-parties/Torque/templates/src/templates/om/Peer.vm	(revision 413121)
> +++ E:/Projekty/3rd-parties/Torque/templates/src/templates/om/Peer.vm	(working copy)
> @@ -125,7 +125,7 @@
>  
>      /** A class that can be returned by this peer. */
>      protected static final String CLASSNAME_DEFAULT =
> -        "${package}.$table.JavaName";
> +        "${packageObject}.$table.JavaName";
>  
>      /** A class that can be returned by this peer. */
>      protected static final Class CLASS_DEFAULT = initClass(CLASSNAME_DEFAULT);

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] Resolved: (TORQUE-28) Generator doesn't generate correctly BaseXXXPeer.java files if property torque.subpackage.object is specified

Posted by "Thomas Fischer (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/TORQUE-28?page=all ]
     
Thomas Fischer resolved TORQUE-28:
----------------------------------

    Fix Version: 3.2.1
     Resolution: Fixed
      Assign To: Thomas Fischer

> Generator doesn't generate correctly BaseXXXPeer.java files if property torque.subpackage.object is specified
> -------------------------------------------------------------------------------------------------------------
>
>          Key: TORQUE-28
>          URL: http://issues.apache.org/jira/browse/TORQUE-28
>      Project: Torque
>         Type: Bug

>   Components: Generator
>     Versions: 3.2
>  Environment: All environments
>     Reporter: Mojmir Hanes
>     Assignee: Thomas Fischer
>     Priority: Minor
>      Fix For: 3.2.1

>
> It seems torque generator incorrectly generates BaseXXXPeer 
>       java sources if property torque.subpackage.object is specified.
> Bug can be reproduced this way
> 1. set property torque.subpackage.object (for example 
> torque.subpackage.object = object)
> 2. execute maven torque:om goal
> 3. examine generated BaseXXXPeer.java files. Look for lines
>      /** A class that can be returned by this peer. */
>      protected static final String CLASSNAME_DEFAULT =
>          "${package}.${table}";
> (instead of velocity variables package and table  you'll see substituted 
> values, of course)
> Correct lines should looks like
>      /** A class that can be returned by this peer. */
>      protected static final String CLASSNAME_DEFAULT =
>          "${packageObject}.${table}";
> Bug is in Torque templates module, in file 
> templates/src/templates/om/Peer.vm
> Here is patch
> Best regards
> Mojmir Hanes
> Index: E:/Projekty/3rd-parties/Torque/templates/src/templates/om/Peer.vm
> ===================================================================
> --- E:/Projekty/3rd-parties/Torque/templates/src/templates/om/Peer.vm	(revision 413121)
> +++ E:/Projekty/3rd-parties/Torque/templates/src/templates/om/Peer.vm	(working copy)
> @@ -125,7 +125,7 @@
>  
>      /** A class that can be returned by this peer. */
>      protected static final String CLASSNAME_DEFAULT =
> -        "${package}.$table.JavaName";
> +        "${packageObject}.$table.JavaName";
>  
>      /** A class that can be returned by this peer. */
>      protected static final Class CLASS_DEFAULT = initClass(CLASSNAME_DEFAULT);

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org