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

  • SEARCH
  • Home
  • 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 7994905
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T14:15:13+00:00 2026-06-04T14:15:13+00:00

Does somebody knows how to avoid next WARNING for the following code? org.hibernate.hql.internal.ast.HqlSqlWalker [HqlSqlWalker.java:929]

  • 0

Does somebody knows how to avoid next WARNING for the following code?

org.hibernate.hql.internal.ast.HqlSqlWalker [HqlSqlWalker.java:929] [DEPRECATION] Encountered positional parameter near line 1, column 56.  Positional parameter are considered deprecated; use named parameters or JPA-style positional parameters instead.
Hibernate: select user0_.ID_USER as ID1_0_, user0_.USERNAME as USERNAME0_, user0_.PASSWORD as PASSWORD0_ from USER user0_ where user0_.USERNAME=?
Hibernate: select authoritie0_.ID_USER as ID1_0_1_, authoritie0_.ID_ROLE as ID2_1_, role1_.ID_ROLE as ID1_2_0_, role1_.NOMBRE as NOMBRE2_0_, role1_.DESCRIPCION as DESCRIPC3_2_0_ from USER_ROLE authoritie0_ inner join ROLE role1_ on authoritie0_.ID_ROLE=role1_.ID_ROLE where authoritie0_.ID_USER=?

Query query = sessionFactory.getCurrentSession().createQuery("from User where username=?");
query.setString(0, username);   
List<User> users = query.list();
  • 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-04T14:15:14+00:00Added an answer on June 4, 2026 at 2:15 pm

    As the message says, use named parameters instead.

    List users = sessionFactory.getCurrentSession()
            .createQuery( "from User where username = :username" )
            .setString( "username", username )
            .list();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does somebody knows where the file with the actual stored SharedPreferences is located?
Can somebody tell me what does this mean? I'm going trough Java book and
I'm using the recess framework. Does somebody knows how to get the Authorization header
Does somebody know how to create a chart by code? C#, Visual Studio 2010.
Does somebody knows if its possible to build a T-SQL query to obtain the
Does somebody knows what this error means? Fatal Python error: PyEval_RestoreThread: NULL tstate In
Does somebody know how to recover a never-starting eclipse when the error org.eclipse.swt.SWTError: Item
Does somebody know a Java library which serializes a Java object hierarchy into Java
Does somebody know what is the memory overhead of a ConcurrentHashMap (compared to a
Does somebody know a module, which has a function that returns ( for example

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.