PIM-1983 : use findOneByEntityAndCode to retrieve attribute