id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 9132 QuerySet. count() doesn't do a Join if tables are inherited stsp1@… cazzerson "the sql-query for result with correct joins: SELECT ""springshop_spring"".""id"", ""springshop_spring"".""material"", ""springshop_spring"".""articelnumber"", ""springshop_spring"".""wiresize"", ""springshop_spring"".""outerdiameter"", ""springshop_spring"".""windingcount"", ""springshop_spring"".""weight"", ""springshop_pressurespring"".""spring_ptr_id"", ""springshop_pressurespring"".""freelengthLo"", ""springshop_pressurespring"".""springconstant"", ""springshop_pressurespring"".""blocklength"" FROM ""springshop_pressurespring"" INNER JOIN ""springshop_spring"" ON (""springshop_pressurespring"".""spring_ptr_id"" = ""springshop_spring"".""id"") WHERE wiresize=2 the sql-query for count with incorrect joins: 'SELECT COUNT(*) FROM ""springshop_pressurespring"" WHERE wiresize=2' so the join is missing" closed Database layer (models, ORM) 1.0 invalid count() QuerySet Accepted 0 0 0 0 0 0