Set DQL Function for MySql