finally entity lookup from mysql database works as expected