Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Groovy
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 17:20pm
Edited 27-Apr-13 1:51am
(no name)500K
v2

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

  Print Answers RSS
0 OriginalGriff 512
1 Maciej Los 445
2 Sergey Alexandrovich Kryukov 401
3 PIEBALDconsult 178
4 CPallini 170
0 Sergey Alexandrovich Kryukov 6,813
1 OriginalGriff 5,342
2 Peter Leow 3,837
3 Mika Wendelius 2,850
4 CHill60 2,748


Advertise | Privacy | Mobile
Web01 | 2.8.150224.1 | Last Updated 27 Apr 2013
Copyright © CodeProject, 1999-2015
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