Glorp optimise some simple query

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Glorp optimise some simple query

Maarten Mostert-2
Hi,

The following statements assure me that the object aStake is actually freshly extracted from the database.

aStake := self getGlorpSession readOneOf: Stake where: [:each | each id = (undoDic at: #id)].
self getGlorpSession refresh: aStake.

If aStake is allready in the cache it will only effectuate the refreshement, however if it is not in cache the
operation will be done twice.

I am sure that there is a simple way to avoid doing the operation twice.

Thanks in adavance.

@+Maarten,


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Glorp optimise some simple query

Boris Popov, DeepCove Labs (SNN)
session execute: ((Query readOneOf: Stake where: [:each | each id =
(undoDic at: #id)])
                                shouldRefresh: true;
                                yourself)

-Boris

--
DeepCove Labs Ltd.
+1 (604) 689-0322
4th floor, 595 Howe Street
Vancouver, British Columbia
Canada V6C 2T5
http://tinyurl.com/r7uw4

PacNet Services (Europe) Ltd.
+353 (0)61 714-360
Shannon Airport House, SFZ
County Clare, Ireland
http://tinyurl.com/y952amr

CONFIDENTIALITY NOTICE

This email is intended only for the persons named in the message header.
Unless otherwise indicated, it contains information that is private and
confidential. If you have received it in error, please notify the sender
and delete the entire message including any attachments.

Thank you.


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Maarten MOSTERT
Sent: 19 August 2010 13:26
To: VWNC
Subject: [vwnc] Glorp optimise some simple query

Hi,

The following statements assure me that the object aStake is actually
freshly extracted from the database.

aStake := self getGlorpSession readOneOf: Stake where: [:each | each id
= (undoDic at: #id)].
self getGlorpSession refresh: aStake.

If aStake is allready in the cache it will only effectuate the
refreshement, however if it is not in cache the operation will be done
twice.

I am sure that there is a simple way to avoid doing the operation twice.

Thanks in adavance.

@+Maarten,


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Glorp optimise some simple query

Steven Kelly
In reply to this post by Maarten Mostert-2
Maybe something like this:
session execute: ((Query returningOneOf: aClass where: aBlock)
shouldRefresh: true).
S.

> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On
> Behalf Of Maarten MOSTERT
> Sent: 19. elokuuta 2010 15:26
> To: VWNC
> Subject: [vwnc] Glorp optimise some simple query
>
> Hi,
>
> The following statements assure me that the object aStake is actually
> freshly extracted from the database.
>
> aStake := self getGlorpSession readOneOf: Stake where: [:each | each
id
> = (undoDic at: #id)].
> self getGlorpSession refresh: aStake.
>
> If aStake is allready in the cache it will only effectuate the
> refreshement, however if it is not in cache the
> operation will be done twice.
>
> I am sure that there is a simple way to avoid doing the operation
twice.

>
> Thanks in adavance.
>
> @+Maarten,
>
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc