[
https://issues.apache.org/jira/browse/TORQUE-304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15125487#comment-15125487
]
Thomas Vandahl commented on TORQUE-304:
---------------------------------------
I'm not sure about the general use case here but in my applications I almost
exclusively use getByPeerName() with the Column constants generated in the Peer
objects. So I suggest to deprecate the above-mentioned methods and replace them
with something like setByColumn(Column, Object) and getByColumn(Column)
WDYT?
> 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
> Fix For: 4.1
>
>
> 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.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]