この「単純な」SQLステートメントをSQL-Alchemyにマップしようとしています
select DISTINCT cv.*, ct."name"
from "CarVariants" cv,
"Cars" ca,
"CarTypes" ct
where cv."f_keyNumber" = ca."keyNumber"
and cv."carType" = ca."carType"
and cv."carType" = ct."f_carType"
and "f_keyNumber" = '12345'
and "f_carId" = 1
このようなもの:
variants = self.em.CarVariants.createQuery();
variants = variants.filter_by(f_keyNumber=12345, f_carId = 1).distinct()
「and」関係 (Cars、CarTypes) を追加するにはどうすればよいですか?