[Teneo] Diasbling Two Phase Load Hibernate [message #957371] |
Thu, 25 October 2012 07:13 |
Appasamy Thirugnana Messages: 27 Registered: September 2012 |
Junior Member |
|
|
Hi all,
I have a class/entity 'Department'.
It don't have any references to any other class or entities.
When I fetch it using Teneo like below
Query query = session.createQuery( "from Department" );
List<EObject> listObj= query.list();
It's taking time in resolving associations as I am seeing below in log
DEBUG org.hibernate.engine.TwoPhaseLoad - resolving associations for [Department#Dept-1]
Why is this happening even though I don't have associations.
Is there anyway I can tell teneo/hibernate to avoid this so that I get quicker turnaround time.
Thanks,
Appasamy
[Updated on: Thu, 25 October 2012 08:38] Report message to a moderator
|
|
|
Re: [Teneo] Diasbling Two Phase Load Hibernate [message #957455 is a reply to message #957371] |
Thu, 25 October 2012 08:28 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Appasa,
Afaics Hibernate still sees an association, probably from Employee to Department. Does your ecore really not show an
association? If you changed your model, have you regenerated the java code (the model is part of the code, that's used
by Teneo).
I am not sure that resolving association actually means that the referenced object is loaded. To really know/see what
happens you have to check the sql used by hibernate. You can see the sql by setting the hibernate hibernate.show_sql to
true (in the properties you pass to the hibernate store).
Also read the hibernate manual for things like fetch and join strategies. It is quite possible to tune the load
strategies of hibernate.
gr. Martin
On 10/25/2012 09:13 AM, Appasamy Thirugnana wrote:
> Hi all,
>
> I have a class/entity 'Department'.
>
> It don't have any references to any other class or entities.
>
> When I fetch it using Teneo like below
>
> Query query = session.createQuery( "from Employee" );
> List<EObject> listObj= query.list();
>
>
> It's taking time in resolving associations as I am seeing below in log
>
> DEBUG org.hibernate.engine.TwoPhaseLoad - resolving associations for [Department#Dept-1]
>
>
> Why is this happening even though I don't have associations.
>
> Is there anyway I can tell teneo/hibernate to avoid this so that I get quicker turnaround time.
>
>
> Thanks,
> Appasamy
>
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
|
|
|
|
|
Powered by
FUDForum. Page generated in 3.33497 seconds