1. When using hibernate"s sql query, the result of the database query is 1, and when it is returned to the backend, the result is transformed to 0.
2. The code is as follows:
database query code:
eclipse:
3.:
4. Tried method:
1 when using a sql query, add |""to convert the result of count (1) to a string type.
2 when using a sql query, add |""to convert the result of to_chat () to a string type.
3 when eclipse accepts the results of the query, use the toString () method to convert the results to a string type.
4 when eclipse accepts the results of the query, use the (String) method to convert the results to a string type.
5. Needed help:
how to use hibernate to return integer results of queries in the database to chat, or convert results of type int to type String.