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 8997217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:51:31+00:00 2026-06-15T23:51:31+00:00

Assume there are two tables. Table A and Table B. Table A has {id,

  • 0

Assume there are two tables. Table A and Table B.

Table A has {id, name, desc}
Table B has {id, name, place}

I’m trying to display the name, id columns where a.id equals b.id.

Hibernate is not displaying records properly.

Could someone help me with the solution?

Thanks,
Kathir

  • 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-15T23:51:32+00:00Added an answer on June 15, 2026 at 11:51 pm

    You can write this type of queries like this:

     Query qry = session.createQuery("select a.name, a.id from A a, B b where a.id = b.id");
     List l = qry.list();
     Iterator it = l.iterator();
     while(it.hasNext())
     {
         Object o[] = (Object o[])it.next();
         System.out.println("name = "+o[0]+" id = "+o[0]);
    
     }
    

    In this case hibernate internally stores the multiple column values of each row into an object array and stores these object arrays into List collection. At the time of iterating the collection, we need to typecast the result into an object arrays.

    Cheers and Happy Coding!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Assume there are two tables: Remote_table and My_table . Remote_table has 6 columns: PROJECT
I am trying to pull records from two tables, a master table, and a
Assume that there are two tables in a database. First one is X, second
I have two tables - incoming tours(id,name) and incoming_tours_cities(id_parrent, id_city) id in first table
Suppose I have two tables A and B . Table A has a multi-level
Assume there are two separate web applications: a sports site with admin backend an
I have two tables say ( FCT_SALES_SUMMARY_A and FCT_SALES_SUMMARY_B ). If we assume that
I have two tables that I would like to display as a single result,
I'm kinda stuck defining a Hibernate Entity: Assuming I have the following two tables
For example, say I have two tables, Product and Order . Product has ID

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.