Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7815379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T05:30:15+00:00 2026-06-02T05:30:15+00:00

I was using Hibernate 3.6 where I have a code like this: list =getSession().createSQLQuery(queryString)

  • 0

I was using Hibernate 3.6 where I have a code like this:

list =getSession().createSQLQuery(queryString)
        .addScalar("UNAME",Hibernate.STRING)
        .addScalar("COM",Hibernate.STRING)
        .addScalar("COM_DATE",Hibernate.DATE) 
        .setString("id", Id).list();

now I change the jar from 3.6 to 4.1Final

it seems like the addScalar method is askying for Type in stead of Hibernate.STRING
I couldn’t find any example hot to resolve this. if there is anyone that who know please help me thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T05:30:17+00:00Added an answer on June 2, 2026 at 5:30 am

    Type fields in org.hibernate.Hibernate are deprecated (and actually removed) as result of HHH-5196

    Now different Hibernate types can be found from javadocs for Type. In your case following should work:

        .addScalar("UNAME", StringType.INSTANCE)
        .addScalar("COM", StringType.INSTANCE)
        .addScalar("COM_DATE", DateType.INSTANCE) 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using nhibernate and i have code like this in the mapping area:
I have a list mapped using Hibernate with an index column. The table looks
I would like to ask if it's possible to do this using hibernate. Let
I have been using Hibernate very successfully, but today I noticed a bizarre phenomenon
I have a problem with a query using hibernate. The entity class EntityClass has
I have a web app using Hibernate, and I am attempting to persist some
I'm using: Hibernate MySQL jBoss I have to create an application that allows user
I using Hibernate 3.6 Final, Guice-persist and JPA2. So good, I have everything configured,
Hi I am using hibernate and Mysql. I have a class with a boolean
I have a bean which I map to the database using Hibernate. I'm using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.