[entity] ad dmissing use clause by Book
[entity] refactor NextId generation, use raw SQL

Use raw SQL, em->persist and em->flush causes an infinite loop in
UnitOfWork::cascadePersist (line 2128: associationMappings = array_filter).
[entity] use parent getters in EntityRepository instead of parent fields