Open shepmaster opened 10 years ago
Same problem here after updating to rails 4.2.1 - I had no problems with rails 4.1.10
+1 When going from 4.1.16 to 4.2.7.1.
edit: actually, this may not be related to squeel on my end. I'll update later.
Issue is still present on subqueries with polymorphic relations
notes_relation = Person.first.notes
klazz_name = "Person"
relation = Person.joins { notes_relation.as("notes").on { (~id == notes.notable_id) & (notes.notable_type == klazz_name) }.outer }.where { notes.note != nil }
puts relation.debug_sql.inspect
puts relation.to_a
raises: PG::ProtocolViolation: ERROR: bind message supplies 0 parameters, but prepared statement "" requires 2
While trying to reproduce #343, I ran into another error.
You can use the same repo to reproduce the problem.