add id and object detection for User and Attachment models