fixed most warnings. Implemented orderBy for composite pks. Added a failing test for returning a composite pk from a query