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 "Thomas Fox (JIRA)" <ji...@apache.org> on 2013/11/21 22:46:35 UTC

[jira] [Commented] (TORQUE-304) getPeerByName generated incorrectly

    [ https://issues.apache.org/jira/browse/TORQUE-304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13829380#comment-13829380 ] 

Thomas Fox commented on TORQUE-304:
-----------------------------------

used getSqlExpression() as an alternative to getColumnName() to match current implementation of setByPeerName.
So setByPeerName and getByPeerName take alternatively the fully qualified name or the simple column name.

> getPeerByName generated incorrectly
> -----------------------------------
>
>                 Key: TORQUE-304
>                 URL: https://issues.apache.org/jira/browse/TORQUE-304
>             Project: Torque
>          Issue Type: Bug
>          Components: Templates
>    Affects Versions: 4.0
>            Reporter: Jeff Randolph
>            Assignee: Thomas Fox
>            Priority: Minor
>
> The getByPeerName method is generated in the base db objects as follows:
>     public Object getByPeerName(String name)
>     {
>             if (name.equals(org.abc.MyPeer.MyColumn))
>             {
>                 return getMyColumn();
>             }
>     }
> This will never work because org.abc.MyPeer.MyColumn is a Column, not a String.  It should instead generate this:
>     public Object getByPeerName(String name)
>     {
>             if (name.equals(org.abc.MyPeer.MyColumn.getColumnName()))
>             {
>                 return getMyColumn();
>             }
>     }



--
This message was sent by Atlassian JIRA
(v6.1#6144)

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