I am trying to print the query for logging purpose, I tried using ObjectMapper to convert org.hibernate.query.criteria.internal.Criteria object into String but getting serialisation error. Any suggestion would be helpful..
Thanks
I am trying to print the query for logging purpose, I tried using ObjectMapper to convert org.hibernate.query.criteria.internal.Criteria object into String but getting serialisation error. Any suggestion would be helpful..
Thanks
If you just want to convert the object to String , you can try GSON. You have to install the Gson jar first after that
String query = new Gson().toJson(hibernate_object);