JPA native query return class

后端 未结 4 802
别跟我提以往
别跟我提以往 2021-02-06 06:32

In the JPA, I defined a native sql which will return String,

@NamedNativeQuery(name = \"alert\", 
query = \" select distinct c.accountId from account c \", 
            


        
4条回答
  •  情歌与酒
    2021-02-06 07:01

    In my case, I changed hibernate version from 3.5.6 to 4.3.3. it is working fine.

    
    
    
            
                org.hibernate
                hibernate-core
                4.3.3.Final
            
            
              org.hibernate
              hibernate-core
              4.3.3.Final
            
            
                org.hibernate
                hibernate-entitymanager
                4.3.3.Final
            
    

提交回复
热议问题