Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [Teneo] Diasbling Two Phase Load Hibernate(Diasbling Two Phase Load Hibernate)
[Teneo] Diasbling Two Phase Load Hibernate [message #957371] Thu, 25 October 2012 07:13 Go to next message
Appasamy Thirugnana is currently offline Appasamy ThirugnanaFriend
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 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
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
Re: [Teneo] Diasbling Two Phase Load Hibernate [message #957466 is a reply to message #957455] Thu, 25 October 2012 08:41 Go to previous messageGo to next message
Appasamy Thirugnana is currently offline Appasamy ThirugnanaFriend
Messages: 27
Registered: September 2012
Junior Member
Hi Martin,

Thanks for the input.

Oops!. The actual query is

Query query = session.createQuery( "from Department" );


Not "from Employee"

Employee- Associated to Department
Department - Not associated to any entity

So my doubt of why hibernate trying to resolve association when I try to load just all Departments.


I will also look in to hibernate documentation as you suggest.

Thanks Martin.

~Appasamy







Re: [Teneo] Diasbling Two Phase Load Hibernate [message #1060396 is a reply to message #957466] Fri, 24 May 2013 13:23 Go to previous message
mohamed rafeeq is currently offline mohamed rafeeqFriend
Messages: 1
Registered: May 2013
Junior Member
Hi appasamy,

I have the same issue did you figure out what the issue is ?

Rafeeq
Previous Topic:Model Evolution: Mixing of generated and dynamic models
Next Topic:[XCore] Compiler overrides code tagged as not generated
Goto Forum:
  


Current Time: Tue Apr 16 04:06:56 GMT 2024

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

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

Back to the top