Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Teneo und Deep Objektgraphs
Teneo und Deep Objektgraphs [message #632342] Tue, 12 October 2010 14:59 Go to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6505
Registered: July 2009
Senior Member
Hi,

I'm not sure this is really a problem of Teneo or more general a problem
of Hibernate itself.

Suppose you have the following Containment-Structure (ie a bidirectional
relation).

Company
Country
Region
Store
Department

When you now issue a HQL-Query "FROM Department" you'll notice that
Hibernate is executing after the first fetch an SQL-Statement which
JOINS Store, Region, Country, Company to follow up the the parent path.

Now imaging the Object-Graph is getting 10-times deeper and you'll get a
SQL-Statement with a lot, a lot of JOINS (in my case it even goes beyond
the limit of the database).

Anybody an idea how this could be solved?

Tom
Re: Teneo und Deep Objektgraphs [message #632359 is a reply to message #632342] Tue, 12 October 2010 16:17 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Tom,
Yes the parent econtainer relations are mapped using a hibernate custom type, apparently these are eagerly fetched. I
need to check if they support lazy loading. Can you enter a bugzilla for this? If you have a focused test model that
would be great, I can also create one myself (sounds pretty reproducable...).

gr. Martin

On 10/12/2010 04:59 PM, Tom Schindl wrote:
> Hi,
>
> I'm not sure this is really a problem of Teneo or more general a problem
> of Hibernate itself.
>
> Suppose you have the following Containment-Structure (ie a bidirectional
> relation).
>
> Company
> Country
> Region
> Store
> Department
>
> When you now issue a HQL-Query "FROM Department" you'll notice that
> Hibernate is executing after the first fetch an SQL-Statement which
> JOINS Store, Region, Country, Company to follow up the the parent path.
>
> Now imaging the Object-Graph is getting 10-times deeper and you'll get a
> SQL-Statement with a lot, a lot of JOINS (in my case it even goes beyond
> the limit of the database).
>
> Anybody an idea how this could be solved?
>
> Tom


--

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@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: Teneo und Deep Objektgraphs [message #632424 is a reply to message #632359] Tue, 12 October 2010 20:22 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6505
Registered: July 2009
Senior Member
Hi Martin,

So modeling them as bi-directional and not as containment this would not
happen?

I'm not sure that this is a teneo specific problem because when i read
the Hibernate-Docs correct hibernate has to fetch resolve bi-directional
references.

I'll file a bugzilla with a model that should reproduce the problem.

Tom

Am 12.10.10 18:17, schrieb Martin Taal:
> Hi Tom,
> Yes the parent econtainer relations are mapped using a hibernate custom
> type, apparently these are eagerly fetched. I need to check if they
> support lazy loading. Can you enter a bugzilla for this? If you have a
> focused test model that would be great, I can also create one myself
> (sounds pretty reproducable...).
>
> gr. Martin
>
> On 10/12/2010 04:59 PM, Tom Schindl wrote:
>> Hi,
>>
>> I'm not sure this is really a problem of Teneo or more general a problem
>> of Hibernate itself.
>>
>> Suppose you have the following Containment-Structure (ie a bidirectional
>> relation).
>>
>> Company
>> Country
>> Region
>> Store
>> Department
>>
>> When you now issue a HQL-Query "FROM Department" you'll notice that
>> Hibernate is executing after the first fetch an SQL-Statement which
>> JOINS Store, Region, Country, Company to follow up the the parent path.
>>
>> Now imaging the Object-Graph is getting 10-times deeper and you'll get a
>> SQL-Statement with a lot, a lot of JOINS (in my case it even goes beyond
>> the limit of the database).
>>
>> Anybody an idea how this could be solved?
>>
>> Tom
>
>
Re: Teneo und Deep Objektgraphs [message #632507 is a reply to message #632424] Wed, 13 October 2010 08:52 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Tom,
Yes guess so, the problem is that the custom user type used for econtainer associations does eager fetching, for normal
associations this eager fetching can be controlled by annotations.

I will react in the bugzilla.

gr. Martin

On 10/12/2010 10:22 PM, Tom Schindl wrote:
> Hi Martin,
>
> So modeling them as bi-directional and not as containment this would not
> happen?
>
> I'm not sure that this is a teneo specific problem because when i read
> the Hibernate-Docs correct hibernate has to fetch resolve bi-directional
> references.
>
> I'll file a bugzilla with a model that should reproduce the problem.
>
> Tom
>
> Am 12.10.10 18:17, schrieb Martin Taal:
>> Hi Tom,
>> Yes the parent econtainer relations are mapped using a hibernate custom
>> type, apparently these are eagerly fetched. I need to check if they
>> support lazy loading. Can you enter a bugzilla for this? If you have a
>> focused test model that would be great, I can also create one myself
>> (sounds pretty reproducable...).
>>
>> gr. Martin
>>
>> On 10/12/2010 04:59 PM, Tom Schindl wrote:
>>> Hi,
>>>
>>> I'm not sure this is really a problem of Teneo or more general a problem
>>> of Hibernate itself.
>>>
>>> Suppose you have the following Containment-Structure (ie a bidirectional
>>> relation).
>>>
>>> Company
>>> Country
>>> Region
>>> Store
>>> Department
>>>
>>> When you now issue a HQL-Query "FROM Department" you'll notice that
>>> Hibernate is executing after the first fetch an SQL-Statement which
>>> JOINS Store, Region, Country, Company to follow up the the parent path.
>>>
>>> Now imaging the Object-Graph is getting 10-times deeper and you'll get a
>>> SQL-Statement with a lot, a lot of JOINS (in my case it even goes beyond
>>> the limit of the database).
>>>
>>> Anybody an idea how this could be solved?
>>>
>>> Tom
>>
>>
>


--

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@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Previous Topic:[CDO] Timeout when connecting to server
Next Topic:[TENEO] where is teneo 1.2
Goto Forum:
  


Current Time: Mon Oct 14 16:45:13 GMT 2019

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

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

Back to the top