What is the type of foo_id? If this is a custom ID, why you are using uid() func? What value must be evaluated?
foo_id