WoltLab/WCF — Issue #223: wcf\data\DatabaseObject::getSelectQuery()
Author: Gravatronics
Created: 2011-10-08 16:03:04+00:00
State: open

If you have more complex queries when selecting the data of a database object - for example a simple join with the users table to get the username - you have to copy and past the original `wcf\data\DatabaseObject::__construct()` method and just change the query.

Since such simple joins and additional selects aren't that rare, wouldn't it be nicer to have a protected `wcf\data\DatabaseObject::getSelectQuery()` method that simply delivers the needed query? If you have extra joins you can easily overwrite that method without having to copy the rest of the constructor which remains unchanged.