This problem can be solved by using CAST () in SQL SELECT query Something in this way: SELECT CAST (Id AS UUID) FROM MyEntity;