I now see how to change this so that it makes more sense. The parameter substitution isn't designed to work for things like table names - it's for the WHERE clause, which is sort of a fundamental flaw in all ORMs, IMO. Anyway, I think I have something workable now.