ORM wrapper take all fields of a record, even when only one field is needed.
From research that I've done on the subject, any complex query is going to require horrendous amounts of work to build, either on the back-end or on the part of the programmer. The major problem with the libraries that support "simplified" complex query building is that invariably you'll want to do something that is not covered by the library's API and you'll end up with hand-coding the query anyway. And, of course, the second point is that these APIs are necessarily large and heavy, which is of questionable use in 99% of cases. So it comes down to a question of optimization. Carry an elephant gun everywhere you go to swat the mosquitoes with, just on the off chance you'll run into a rogue elephant, or carry a flyswatter and dig an elephant trap if there's a rogue in the neighborhood.
Quote from: sottwell at Mar 29, 2012, 10:20 PMFrom research that I've done on the subject, any complex query is going to require horrendous amounts of work to build, either on the back-end or on the part of the programmer. The major problem with the libraries that support "simplified" complex query building is that invariably you'll want to do something that is not covered by the library's API and you'll end up with hand-coding the query anyway. And, of course, the second point is that these APIs are necessarily large and heavy, which is of questionable use in 99% of cases. So it comes down to a question of optimization. Carry an elephant gun everywhere you go to swat the mosquitoes with, just on the off chance you'll run into a rogue elephant, or carry a flyswatter and dig an elephant trap if there's a rogue in the neighborhood.
This is why xPDO is superior; it has driver-specific classes that you can write methods for to run specific queries for various DB drivers, without having to run switch statements.
xPDO can also handle many edge cases with complex SQL statements via its nested array syntax and conditional prefixing in the xPDOQuery->where() command.
This discussion is closed to further replies. Keep calm and carry on.