Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Valid Fetch Types
Valid Fetch Types [message #94149] Fri, 24 August 2007 23:32 Go to next message
Jason Henriksen is currently offline Jason HenriksenFriend
Messages: 231
Registered: July 2009
Senior Member
Hi Martin,

I'm trying to initialize a collection of objects and it creates a join
query. Because I'm joining two table with many millions of records these
queries take over a minute to perform.

I noticed in the hibernate documentation that you could set the fetch type
to 'subselect' and supposedly it would not use the join for this query. I'm
not sure if that would even work, but when I tried it I found that subselect
isn't listed in FetchType. Do you know if it should be, or am I barking up
the wrong tree?

If this is an area where I can be of any service, either by adding the type
and wiring it up to hibernate or providing some exaple documentation just
let me know.
(By the way, I haven't forgotten about putting together a Teneo+SOAP
tutorial. I'm just trying to make sure all of my stuff works happily before
telling other people who to do it. However, you'll be pleased to know that
I take objects out of soap, load and save them and then return them as SOAP
quite nicely now so a tutorial shouldn't be too far off.)

Thanks for any help you can offer,

Jason
Re: Valid Fetch Types [message #94227 is a reply to message #94149] Sun, 26 August 2007 05:58 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Jason,
The subselect is a hibernate specific annotation so these can be found in the HbAnnotation package
in the hibernate.mapper plugin. You can set a @Fetch annotation on an ereference which again can
contain a HbFetchType.SUBSELECT (see the hibernate annotations manual), the annotation is called
HbFetchType to distinguish it from the jpa FetchType. Can you let me know if this works as I do not
have a testcase for this specific case?
No problem about the soap tutorial (good that it works fine).

gr. Martin

Jason Henriksen wrote:
> Hi Martin,
>
> I'm trying to initialize a collection of objects and it creates a join
> query. Because I'm joining two table with many millions of records these
> queries take over a minute to perform.
>
> I noticed in the hibernate documentation that you could set the fetch type
> to 'subselect' and supposedly it would not use the join for this query. I'm
> not sure if that would even work, but when I tried it I found that subselect
> isn't listed in FetchType. Do you know if it should be, or am I barking up
> the wrong tree?
>
> If this is an area where I can be of any service, either by adding the type
> and wiring it up to hibernate or providing some exaple documentation just
> let me know.
> (By the way, I haven't forgotten about putting together a Teneo+SOAP
> tutorial. I'm just trying to make sure all of my stuff works happily before
> telling other people who to do it. However, you'll be pleased to know that
> I take objects out of soap, load and save them and then return them as SOAP
> quite nicely now so a tutorial shouldn't be too far off.)
>
> Thanks for any help you can offer,
>
> Jason
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: Valid Fetch Types [message #609528 is a reply to message #94149] Sun, 26 August 2007 05:58 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Jason,
The subselect is a hibernate specific annotation so these can be found in the HbAnnotation package
in the hibernate.mapper plugin. You can set a @Fetch annotation on an ereference which again can
contain a HbFetchType.SUBSELECT (see the hibernate annotations manual), the annotation is called
HbFetchType to distinguish it from the jpa FetchType. Can you let me know if this works as I do not
have a testcase for this specific case?
No problem about the soap tutorial (good that it works fine).

gr. Martin

Jason Henriksen wrote:
> Hi Martin,
>
> I'm trying to initialize a collection of objects and it creates a join
> query. Because I'm joining two table with many millions of records these
> queries take over a minute to perform.
>
> I noticed in the hibernate documentation that you could set the fetch type
> to 'subselect' and supposedly it would not use the join for this query. I'm
> not sure if that would even work, but when I tried it I found that subselect
> isn't listed in FetchType. Do you know if it should be, or am I barking up
> the wrong tree?
>
> If this is an area where I can be of any service, either by adding the type
> and wiring it up to hibernate or providing some exaple documentation just
> let me know.
> (By the way, I haven't forgotten about putting together a Teneo+SOAP
> tutorial. I'm just trying to make sure all of my stuff works happily before
> telling other people who to do it. However, you'll be pleased to know that
> I take objects out of soap, load and save them and then return them as SOAP
> quite nicely now so a tutorial shouldn't be too far off.)
>
> Thanks for any help you can offer,
>
> Jason
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Previous Topic:[CDO][0.8.0] IStoreReader API
Next Topic:[CDO][0.8.0] EAnnotation
Goto Forum:
  


Current Time: Mon Aug 08 23:01:32 GMT 2022

Powered by FUDForum. Page generated in 0.01627 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top