Let MysqlRepositoryCollection create the metadata repositories.
Make MetaDataService independent of Mysql.
Better delete order for self-referencing entities.
Make sure the metadata repositories get indexed WIP
Merge pull request #2005 from fdlk/master

Make metadata code independent of mysql. Make sure metadata repositories get properly decorated.