Thomas Vandahl wrote: > On 05.02.12 13:52, Thomas Fox wrote: > > 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. > > That is going the Hibernate way, isn't it? Using beans just for data > objects. You're about to remove a Torque-typical feature, you know.
This is why I am asking to know how people feel about this :-) But I still think it is inconsistent. In my opinion, the row manipulating methods should either all be in the dbObjects or in the peer (and thze latter is more convenient because you can savely pass the objects around). Now we have save in the dbObjects and doDelete(), doInsert() and doUpdate() in the Peers. > > If there are no objections, what is your preference for the default > > behaviour ? > > I'd leave the default behavior as it is, that means generate the save() > methods in the dbObject. > > > 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 () ? > > There is already doInsert(obj) and doUpdate(obj) Do we need one more? It is convenient not to bother whether an insert or an update is needed. This is true independently of where the method is located. So yes, I think the save() method is also needed in the peers if you want all row manipulating methods in the peers. Thomas --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
