support for generic entity attaching