* Small fix do get rid of notice `undefined index 'joinTable'` as the inverse side does not declare `joinTable` at all.
* Shortened access to `$classMetadata->associationMappings[$fieldName]` for read accesses to increase readability
If an Entity use STI, it gets its table name from the parent class. In this case, we need to check that the class is the root class of the hierarchy when adding prefix, otherwise children class are prefixed twice.