Skip to main content



      Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Teneo: It is impossible to specify queries order for Hibernate resource
Teneo: It is impossible to specify queries order for Hibernate resource [message #68367] Fri, 19 January 2007 09:15 Go to next message
Eclipse UserFriend
I load very big model from db.

I have optimized the queries (and their order) for loading model. But
HibernateResource is agnostic to query order cause when it parses URI it
puts queries into HashSet and then cannot restore order of queries.

Can it be solved?

Thanks

Ilya
Re: Teneo: It is impossible to specify queries order for Hibernate resource [message #68387 is a reply to message #68367] Fri, 19 January 2007 09:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Ilya,

Not that I know any of the details, but perhaps if a LinkedHashSet were
used, the order would be more deterministic...


Ilya Klyuchnikov wrote:
> I load very big model from db.
>
> I have optimized the queries (and their order) for loading model. But
> HibernateResource is agnostic to query order cause when it parses URI
> it puts queries into HashSet and then cannot restore order of queries.
>
> Can it be solved?
>
> Thanks
>
> Ilya
Re: Teneo: It is impossible to specify queries order for Hibernate resource [message #68395 is a reply to message #68387] Fri, 19 January 2007 11:10 Go to previous message
Eclipse UserFriend
Ilya,
What happens is the following: the parameters in the queryset (of the uri) are put in a hashmap
(keyed on parameter name). The getqueries method then retrieves the query parameters from the
hashmap. I can change this by using a treemap instead of a hashmap. This is a small change and will
make the retrieval order of the queries more deterministic (in order of their parameter name).
Please enter a bugzilla for this as well.

Btw you can override getqueries to implement this yourselve for now.

gr. Martin

Ed Merks wrote:
> Ilya,
>
> Not that I know any of the details, but perhaps if a LinkedHashSet were
> used, the order would be more deterministic...
>
>
> Ilya Klyuchnikov wrote:
>> I load very big model from db.
>>
>> I have optimized the queries (and their order) for loading model. But
>> HibernateResource is agnostic to query order cause when it parses URI
>> it puts queries into HashSet and then cannot restore order of queries.
>>
>> Can it be solved?
>>
>> Thanks
>>
>> Ilya


--

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: Teneo: It is impossible to specify queries order for Hibernate resource [message #601411 is a reply to message #68367] Fri, 19 January 2007 09:29 Go to previous message
Eclipse UserFriend
Ilya,

Not that I know any of the details, but perhaps if a LinkedHashSet were
used, the order would be more deterministic...


Ilya Klyuchnikov wrote:
> I load very big model from db.
>
> I have optimized the queries (and their order) for loading model. But
> HibernateResource is agnostic to query order cause when it parses URI
> it puts queries into HashSet and then cannot restore order of queries.
>
> Can it be solved?
>
> Thanks
>
> Ilya
Re: Teneo: It is impossible to specify queries order for Hibernate resource [message #601413 is a reply to message #68387] Fri, 19 January 2007 11:10 Go to previous message
Eclipse UserFriend
Ilya,
What happens is the following: the parameters in the queryset (of the uri) are put in a hashmap
(keyed on parameter name). The getqueries method then retrieves the query parameters from the
hashmap. I can change this by using a treemap instead of a hashmap. This is a small change and will
make the retrieval order of the queries more deterministic (in order of their parameter name).
Please enter a bugzilla for this as well.

Btw you can override getqueries to implement this yourselve for now.

gr. Martin

Ed Merks wrote:
> Ilya,
>
> Not that I know any of the details, but perhaps if a LinkedHashSet were
> used, the order would be more deterministic...
>
>
> Ilya Klyuchnikov wrote:
>> I load very big model from db.
>>
>> I have optimized the queries (and their order) for loading model. But
>> HibernateResource is agnostic to query order cause when it parses URI
>> it puts queries into HashSet and then cannot restore order of queries.
>>
>> Can it be solved?
>>
>> Thanks
>>
>> Ilya


--

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:Teneo: It is impossible to specify queries order for Hibernate resource
Next Topic:Teneo newbi, problems getting started
Goto Forum:
  


Current Time: Tue May 06 11:41:31 EDT 2025

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

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

Back to the top