fix hibernate query