Tho*_*att 11 database nhibernate comments
是否可以将注释放入Hibernate查询语言?如果是这样,怎么样?
His*_*ham 22
确保您的会话配置为:
<property name="hibernate.use_sql_comments">true</property>
然后做:
Query query = ...;
query.setComment("Some comment here");
并且您将在MySQL日志文件中看到类似以下内容(如果您使用的是MySQL):
5998 Query /* Some comment here */ select .....