简体   繁体   English

休眠(HQL)

[英]Hibernate (HQL)

I am working with NetBeans and when I write an HQL query I see some weird results, when I make a query, at the HQL Editor, like this from User , it returns what I expect, but If I write: select a.name from User a , it returns nothing, just types names at the column name query(Char Char Byte Byte) , although it says the number of records. 我正在使用NetBeans,当我编写HQL查询时,在HQL编辑器中进行查询时,我会看到一些奇怪的结果,就像from User ,它返回我期望的结果,但是如果我写了: select a.name from User a ,它什么也不会返回,只是在列名query(Char Char Byte Byte)键入名称,尽管它说记录数。 Anyone has seen this before? 有人看过吗?

When you use HQL as select a.name from User a , it should return String[] assuming a.name is String type. 当您使用HQL作为select a.name from User a ,假设a.name是String类型,它应该返回String[] Please update the result retrieval/iteration accordingly and print the output. 请相应地更新结果检索/迭代并打印输出。 It should be working. 它应该正在工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM