Re: [vwnc] Glorp proxy isNil ?

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

Re: [vwnc] Glorp proxy isNil ?

jtuchel
Hi Maarten,

Looks strange, because the let pane says both objects in the collection are not nil. Otoh, if they were proxies, they'd be displayedf in curly braces...

My first idea would be that each is a proxy that resolves to nil due to a non-existent foreign key. afaik, that is the only situation in which a value is loaded as a proxy not knowing it's going to be nil.

The second thing that comes to mind is that Proxies have a problem with messages that are optimized by the vm. In VAST, ifNil: is such a message. So a Proxy will always react to ifNil: as if it is not nil, no matter what it actually represents. But this is not the case in your screenshot.

Joachim

[hidden email] schrieb:

Hi,

On the enclosed debugger screen you can see that the method halted because the value inside the the linksFrom collection was nil (each isNil).

 

https://www.dropbox.com/s/vm6iulnhu9e7tpo/glorp%20nil%20value.png?dl=0

 

However on the left pane you can see that the proxy towards this value is not nil at all.

 

What can be the explanation.

 

Regards,

 

@+Maarten,

 

--
You received this message because you are subscribed to the Google Groups "glorp-group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/glorp-group.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Glorp proxy isNil ?

jtuchel
Just an idea: did you try

each yourSelf ifNil: ?

[hidden email] schrieb:

Hi,

On the enclosed debugger screen you can see that the method halted because the value inside the the linksFrom collection was nil (each isNil).

 

https://www.dropbox.com/s/vm6iulnhu9e7tpo/glorp%20nil%20value.png?dl=0

 

However on the left pane you can see that the proxy towards this value is not nil at all.

 

What can be the explanation.

 

Regards,

 

@+Maarten,

 

--
You received this message because you are subscribed to the Google Groups "glorp-group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/glorp-group.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Glorp proxy isNil ?

Maarten Mostert
In reply to this post by jtuchel

Hi Joachim,

Well it is true that this object started his life as a pure linktable with two primary objects.

I now experiment with an additional third primary key to see if this helps.

The problem only arises on big data, so it'll take some time to run all the test.

I'll let you know.

Thanks,

 

@+Maarten,

 

 

> "Joachim Tuchel" <[hidden email]> |

Hi Maarten,

Looks strange, because the let pane says both objects in the collection are not nil. Otoh, if they were proxies, they'd be displayedf in curly braces...

My first idea would be that each is a proxy that resolves to nil due to a non-existent foreign key. afaik, that is the only situation in which a value is loaded as a proxy not knowing it's going to be nil.

The second thing that comes to mind is that Proxies have a problem with messages that are optimized by the vm. In VAST, ifNil: is such a message. So a Proxy will always react to ifNil: as if it is not nil, no matter what it actually represents. But this is not the case in your screenshot.

Joachim

[hidden email] schrieb:

Hi,

On the enclosed debugger screen you can see that the method halted because the value inside the the linksFrom collection was nil (each isNil).

 

https://www.dropbox.com/s/vm6iulnhu9e7tpo/glorp%20nil%20value.png?dl=0

 

However on the left pane you can see that the proxy towards this value is not nil at all.

 

What can be the explanation.

 

Regards,

 

@+Maarten,

 

--
You received this message because you are subscribed to the Google Groups "glorp-group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/glorp-group.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "glorp-group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/glorp-group.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Glorp proxy isNil ?

Maarten Mostert

Dear Joachim,

 

For the moment I think your hint was correct, in fact If you look carefully the collection is displayed with curly brackets. I modified my descriptor with an extra key and it now passes the tests.

 

Thank you for hint.

 

Regards,

 

@+Maarten,

 

 

> "[hidden email]" <[hidden email]> |

Hi Maarten,

I am not sure we talk about the same thing. What I wanted to say is that one of the few occasions in which a Proxy turns out as nil only after you access it is if it holds a foreign key of a row that is not in the DB (any more). In all other cases there will be now Proxy but a simple nil.

What made me wonder in your screenshots is that the entries in the collection were not displayed in curly braces, like Proxies usually display themselves. That is why I suggested trying sending yourSelf before the ifNil: check. This way you can make sure you are not falling hostage to ifNil: optimizations (which is very possible in VAST, not sure about VW), which will make the Proxy respond to ifNil instead of the value it represents.

HTH

Joachim

Am 30.10.14 um 14:40 schrieb [hidden email]:

Hi Joachim,

Well it is true that this object started his life as a pure linktable with two primary objects.

I now experiment with an additional third primary key to see if this helps.

The problem only arises on big data, so it'll take some time to run all the test.

I'll let you know.

Thanks,

 

@+Maarten,

 

 

> "Joachim Tuchel" [hidden email] |

Hi Maarten,

Looks strange, because the let pane says both objects in the collection are not nil. Otoh, if they were proxies, they'd be displayedf in curly braces...

My first idea would be that each is a proxy that resolves to nil due to a non-existent foreign key. afaik, that is the only situation in which a value is loaded as a proxy not knowing it's going to be nil.

The second thing that comes to mind is that Proxies have a problem with messages that are optimized by the vm. In VAST, ifNil: is such a message. So a Proxy will always react to ifNil: as if it is not nil, no matter what it actually represents. But this is not the case in your screenshot.

Joachim

[hidden email] schrieb:

Hi,

On the enclosed debugger screen you can see that the method halted because the value inside the the linksFrom collection was nil (each isNil).

 

https://www.dropbox.com/s/vm6iulnhu9e7tpo/glorp%20nil%20value.png?dl=0

 

However on the left pane you can see that the proxy towards this value is not nil at all.

 

What can be the explanation.

 

Regards,

 

@+Maarten,

 

--
You received this message because you are subscribed to the Google Groups "glorp-group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/glorp-group.
For more options, visit https://groups.google.com/d/optout.


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



-- ----------------------------------------------------------------------- Objektfabrik Joachim Tuchel [hidden email] Fliederweg 1                         http://www.objektfabrik.de D-71640 Ludwigsburg http://joachimtuchel.wordpress.com Telefon: +49 7141 56 10 86 0         Fax: +49 7141 56 10 86 1

--
You received this message because you are subscribed to the Google Groups "glorp-group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/glorp-group.
For more options, visit https://groups.google.com/d/optout.