better handling of the entries relation with conditions