[entity] implemented getPersistedId() for entities with composite PK [closes #10]

This reverts commit 9803a8dcf1b0d973bf05b3520f7208e3256f6cd1.