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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:52:11+00:00 2026-06-10T01:52:11+00:00

I am looking for a way to do a query that requires a JOIN.

  • 0

I am looking for a way to do a query that requires a JOIN. Is there any way to do this in a prepared statement, or is the rawQuery the only option that I have. If rawQuery is the only option, then is there some way to automatically map the returned objects to the objects of the Dao being implemented.

I’ve dug through the documents and examples but cannot find anything that will allow me to map the raw database result to an ORM object class.

  • 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-10T01:52:13+00:00Added an answer on June 10, 2026 at 1:52 am

    I am looking for a way to do a query that requires a JOIN.

    ORMLite supports simple JOIN queries. You can also use raw-queries to accomplish this.

    You can use the Dao.getRawRowMapper() to map the queries as you found or you can create a custom mapper. The documentation has the following sample code which shows how to map the String[] into your object:

    GenericRawResults<Foo> rawResults =
      orderDao.queryRaw(
        "select account_id,sum(amount) from orders group by account_id",
        new RawRowMapper<Foo>() {
                public Foo mapRow(String[] columnNames,
                  String[] resultColumns) {
                    return new Foo(Long.parseLong(resultColumns[0]),
                        Integer.parseInt(resultColumns[1]));
            }
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any better way to make this query work? I'm looking for a
I have this query that works as desired, but it seems like there should
I'm looking for a way to query the linux man pages through an API,
I'm looking for a way to query a state in a state machine to
I'm looking for a way to query a SQL database with Java and return
My problem is that I was looking for way to use both storyboard and
I have a website that allows users to query for specific recipes using various
I have this idea that using SQL VIEWS to abstract simple database computations (such
I am looking for a way to query a Hibernate database with an external
I have some VBA in Access 2010 that runs a query and exports the

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.