Fixed setting entity id and revision for metadata