"Jeroen De Dauw" posted a comment on MediaWiki.r111264. URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/111264#c30842
Commit summary for MediaWiki.r111264: adding DBDataObject class after having some people review it and posting on the list. docs can currently be found at https://www.mediawiki.org/wiki/User:Jeroen_De_Dauw/DBDataObject Jeroen De Dauw's comment: Yes, I agree, this should not happen. AFAIK this is not happening anywhere in the Education Program extension, which makes heavy use of this class, so it can definitely be avoided. The idea is that you load all fields you need when the object gets constructed. If you then try to get a field that you did not load, it will throw an exception. There are cases where it might be impossible to know in advance what you will need though. For this the class allows for loading additional things later on (with the option to not re-load already loaded data). I don't see any way to avoid doing 2 selects in such cases. If you have an idea that works, I'd be happy to hear it :) _______________________________________________ MediaWiki-CodeReview mailing list mediawiki-coderev...@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview