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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:04:12+00:00 2026-06-17T20:04:12+00:00

I have the following referential constraints setup so that, in: Table A, Table B,

  • 0

I have the following referential constraints setup so that, in:

Table A, Table B, Table C

A.bid = B.id
B.cid = c.id

I need to run a query that retrieves a Table A object with following filters:

A.someCol = 'someVal' and C.someCol='someVal'

So far I have been able to come up with this. This returns a TableAObj but TableCObj is null:

select new TableAObj(TableBObj,TableCObj)
from TableAObj as tao 
left join tao.TableBObj as tbo 
left join tbo.TableCObj as tco 
where tao.someCol = ? and tco.someCol = ?

What is my query missing?

Thanks.

  • 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-17T20:04:13+00:00Added an answer on June 17, 2026 at 8:04 pm

    Figured it out. Here’s the query:

    select from TableAObj where TableAOb.someCol = ? 
    and TableAObj.TableBObj.TableCObj.someCol = ?
    

    Didn’t need the overloaded constructor or the explicit joins.

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

Sidebar

Related Questions

i have following View where user has a table of products and i need
I have following script that executes all the .reg files in the current directory.
I have following CSS: table tbody tr:last-child td { padding-top: 7px; border-bottom: 0; }
I have following table in SQL server (id,name,parentId) (1,nilesh,NULL) (2,nikhil,1) (3,nitin ,2) (4,Ruchi,3) (5,xx,NULL)
I have a PostGreSQL database with the following data model: CREATE TABLE staff (s_id
I have the following Entities and the issue I am having is that I
Have following code. object.waypoint=function () { this.uw=setInterval( function() { console.log(this); }, 200); } How
I have following mapping definitions: <class name=Role table=Role optimistic-lock=version > <id name=Id type=Int32 unsaved-value=0
I have a following table: CREATE TABLE IF NOT EXISTS `Tree` ( `id` int(10)
I have a table (this cannot be changed) like the following: POST_ID | PARENT_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.