On 9/5/06, Michael Lackhoff <[EMAIL PROTECTED]> wrote: > I have written such a method but it looks very clumsy and I think > there must be a more elegant way to do this. This is the code for > just one level up the hierarchy [...] > > And a related question: Is there a manager method for cases where I > know there can be only one (or zero) hits but the query params don't > build the primary keyor a unique column (only the combination is > unique)?
What you're doing looks okay to me. You could perhaps encapsulate this lookup in a Manager method to make the object method look cleaner. As for the uniqueness issue, if the combination really is unique, then why not add a unique key to the database and the class? Then you can load() speculatively instead of doing a Manager query. -John ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object