db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fox <Thomas....@seitenbau.net>
Subject location of save() methods
Date Sun, 05 Feb 2012 12:52:48 GMT

I'd like to turn your attention to
which is about whether the save() methods should be in the generated
dbObject classes or in the peer classes or both.
My personal opinion is that it would be more consistent if the save methods
were in the peer classes because almost all database-related operations are
already there and it would be possible to use the dbObject objects as pure
transport objects without database functionality.

Are there any objections against implementing this ticket? The idea would
be to move the functionality of the save methods to the peer classes and
have delegate methods in the dbObject classes (the generation of these
methods can be turned on and off by setting an option). Like


   public void save(Author toSave) throws TorqueException
       ... (database logic)

Author (optional):

  public void save() throws TorqueException

If there are no objections, what is your preference for the default
behaviour ?
Shold the save methods be in the peer classes only by default or in the
peer and dbObject classes ?
what should the method name in the peer classes be ? save() or doSave() ?


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

View raw message