backport getting constraints via introspection