Fixes attachment orm : bad id calcul, bad cache mecanism