Click here to Skip to main content
12,996,849 members (112,272 online)
Rate this:
 
Please Sign up or sign in to vote.
See more:
I have issues. Please help me I you can.

I have 3 domains called:
- DomainA(id, propA1,propA2)
- DomainB(id, propB1,propB2,forgeinKeyToDomainA)
- DomainC(id, propC1,propC2,forgeinKeyToDomainB)


The relationship of domains is:
DomainA hasMany DomainB, DomainB beLongsTo DomainA
DomainB hasMany DomainC, DomainC beLongsTo DomainB


I wants to get all record from DomainC that propA1="value1"

Imaging SQL code:
Select DomainC.* 
from DomainA,DomainB,DomainC
where DomainA.id=DomainB.forgeinKeyToDomainA
and DomainB.id=DomainC.forgeinKeyToDomainB
and DomainA.propA1="value1"

I can executing SQL code in grails, but I wants to use Hibernate.

Thanks.
Posted 26-Apr-13 16:20pm
ngnlx577
Updated 27-Apr-13 0:51am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.170622.1 | Last Updated 27 Apr 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100