[prev in list] [next in list] [prev in thread] [next in thread] 

List:       turbine-torque-dev
Subject:    [jira] [Commented] (TORQUE-346) Introduce abstract layer for peer impl to reduce the amount of gener
From:       "Thomas Fox (JIRA)" <jira () apache ! org>
Date:       2016-07-30 2:22:20
Message-ID: JIRA.12992690.1469560183000.174963.1469845340461 () Atlassian ! JIRA
[Download RAW message or body]


    [ https://issues.apache.org/jira/browse/TORQUE-346?page=com.atlassian.jira.plugin. \
system.issuetabpanels:comment-tabpanel&focusedCommentId=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-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic