You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Ryan Christianson <ry...@echospace.com> on 2003/08/13 23:49:56 UTC

Peer static methods should have classname prepended

I think I found an oversight in the peer templates.The places where peer 
static methods are accessed with just the method name. For example:

class BaseMyClassPeer {
    public static doSomething() {
        MyClassPeer.work(); // good
        work(); // bad
    }
    public static work() {
       
    }
}

class MyClassPeer extends BaseMyClassPeer {
}

In that example, both MyClassPeer.work() and work(), however, if you 
were to provide your own work method in the MyClassPeer it would not be 
called if in the base it called "work()".

Is this something that should be updated in the templates? I'd be 
whilling to give a diff of what I have. I had to add this so I could 
provide my own buildCriteria method.

Ryan Christianson





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