[jira] [Commented] (TORQUE-346) Introduce abstract layer for peer impl to reduce the amount of generated code

2016-07-29 Thread Thomas Fox (JIRA)

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

Thomas Fox commented on TORQUE-346:
---

I'm not sure what you mena by "availability of a primary key". 
If you mean that the object is already in dthe database and thus has a primary 
key, the answer is no (see e.g. org.apache.torque.test.dbobject.base.BaseExt in 
the test project, which has a primitive primary key which always is set and 
thus obj.getPrimaryKey() will never return null). 
If you mean whether the table has a PK at all, this will probably work 
currently, although it is not documented. However, for me it would be cleaner 
to store this information in the table map instead of relying on the 
obj.getPrimaryKey() method.

> Introduce abstract layer for peer impl to reduce the amount of generated code
> -
>
> Key: TORQUE-346
> URL: https://issues.apache.org/jira/browse/TORQUE-346
> Project: Torque
>  Issue Type: Improvement
>  Components: Runtime, Templates
>Affects Versions: 4.0
>Reporter: Thomas Vandahl
>Assignee: Thomas Vandahl
> Fix For: 4.1
>
>
> Several methods in PeerImpl rely on buildCriteria() and buildColumnValues() 
> respectively. An intermediate layer of AbstractPeerImpl can be used to 
> concentrate these methods in a central class and reduce the amount of 
> generated code duplication.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (TORQUE-346) Introduce abstract layer for peer impl to reduce the amount of generated code

2016-07-27 Thread Thomas Vandahl (JIRA)

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

Thomas Vandahl commented on TORQUE-346:
---

[~tfischer]: Another question: Is obj.getPrimaryKey() != null a valid method to 
check for the availability of a primary key at runtime? If so, I could make the 
decision what to use within buildCriteria(obj) and get rid of buildCriteria(pk).

> Introduce abstract layer for peer impl to reduce the amount of generated code
> -
>
> Key: TORQUE-346
> URL: https://issues.apache.org/jira/browse/TORQUE-346
> Project: Torque
>  Issue Type: Improvement
>  Components: Runtime, Templates
>Affects Versions: 4.0
>Reporter: Thomas Vandahl
>Assignee: Thomas Vandahl
> Fix For: 4.1
>
>
> Several methods in PeerImpl rely on buildCriteria() and buildColumnValues() 
> respectively. An intermediate layer of AbstractPeerImpl can be used to 
> concentrate these methods in a central class and reduce the amount of 
> generated code duplication.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (TORQUE-346) Introduce abstract layer for peer impl to reduce the amount of generated code

2016-07-26 Thread Thomas Vandahl (JIRA)

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

Thomas Vandahl commented on TORQUE-346:
---

[~tfischer]: Question: What is the actual meaning of "torque.om.trackDeleted"? 
It seems not to be documented.

> Introduce abstract layer for peer impl to reduce the amount of generated code
> -
>
> Key: TORQUE-346
> URL: https://issues.apache.org/jira/browse/TORQUE-346
> Project: Torque
>  Issue Type: Improvement
>  Components: Runtime, Templates
>Affects Versions: 4.0
>Reporter: Thomas Vandahl
>Assignee: Thomas Vandahl
> Fix For: 4.1
>
>
> Several methods in PeerImpl rely on buildCriteria() and buildColumnValues() 
> respectively. An intermediate layer of AbstractPeerImpl can be used to 
> concentrate these methods in a central class and reduce the amount of 
> generated code duplication.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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