Added sorting for media entities
Added base entity (@MappedSuperclass)