Something I end up doing a lot (like most developers no doubt) is designing/trying to design a framework which is efficient at instantiating objects from a DB which may have children of the same type, e.g. instantiate object X, object X's properties are retrieved from database, object X has children of the same class, which in turn may/may not also have children...a recursive join in DB speak.
Over the years I've developed various (for want of a better word) hacks to do this, but am still not happy and am wondering if there's a better way than for example a) joining the same table multiple times b) having a chunk a code which does recursive calls or c) relying on a proprietary DB function such as Oracle's 'connect'?
Over the years I've developed various (for want of a better word) hacks to do this, but am still not happy and am wondering if there's a better way than for example a) joining the same table multiple times b) having a chunk a code which does recursive calls or c) relying on a proprietary DB function such as Oracle's 'connect'?



Comment