In the following example we make a user management system where
1. Each user and group are entities
2. User is an entity of type 0
3. Group is an entity of type 1
4. Each entity (user/group) has 0-1 email
5. Each entity has 0-* phonenumbers
6. If an entity is saved all its emails and phonenumbers are also saved
7. If an entity is deleted all its emails and phonenumbers are also deleted
8. When an entity is created and saved a current timestamp will be assigned to 'created' field
9. When an entity is updated a current timestamp will be assigned to 'updated' field
10. Entities will always be fetched in batches