Created
February 27, 2009 07:56
-
-
Save masanobuimai/71341 to your computer and use it in GitHub Desktop.
Grails1.0.4でjoin fetchする
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BlogController { | |
def scaffold = true | |
def list = { | |
[blogInstanceList: Blog.findAll([fetch: [uploadedFile: 'eager']])] | |
} | |
: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hibernate: | |
select | |
this_.id as id2_1_, | |
this_.version as version2_1_, | |
this_.body as body2_1_, | |
this_.title as title2_1_, | |
this_.uploaded_file_id as uploaded5_2_1_, | |
fileinfo2_.id as id0_0_, | |
fileinfo2_.version as version0_0_, | |
fileinfo2_.content_type as content3_0_0_, | |
fileinfo2_.file_content_id as file4_0_0_, | |
fileinfo2_.filename as filename0_0_ | |
from | |
blog this_ | |
left outer join | |
file_info fileinfo2_ | |
on this_.uploaded_file_id=fileinfo2_.id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment