entity doctrine