Re: Qualifier Evaluation with Object in Multiple Editing Contexts

2020-11-18 Thread Paul Hoadley via Webobjects-dev
On 12 Jun 2019, at 11:54 pm, Henrique Prange via Webobjects-dev wrote: > "That's a code smell" was my first thought as well. I tried to pass on the > same editing context among all the components involved in this operation. > However, considering the level of abstraction of the system and the

Re: Qualifier Evaluation with Object in Multiple Editing Contexts

2019-06-12 Thread Henrique Prange via Webobjects-dev
Hey guys, "That's a code smell" was my first thought as well. I tried to pass on the same editing context among all the components involved in this operation. However, considering the level of abstraction of the system and the disconnection between the components, sharing the same editing conte

Re: Qualifier Evaluation with Object in Multiple Editing Contexts

2019-05-31 Thread Chuck Hill via Webobjects-dev
The other thing to consider is that comparing the EOGlobalID means they are the same object, but that does not meant the two objects are the same — if either EC has uncommitted changes. Unless you are using READ UNCOMMITTED that is not a case you will encounter in the database. It does not loo

Re: Qualifier Evaluation with Object in Multiple Editing Contexts

2019-05-31 Thread Aaron Rosenzweig via Webobjects-dev
At the base of it - if you do “.equals()” with one EO and another… even if they generate the same GlobalID they will not be equal if they are in different editingContexts. So that’s why an in memory evaluation doesn’t work. When you query the database, there is no EC in that realm, so you get

Re: Qualifier Evaluation with Object in Multiple Editing Contexts

2019-05-31 Thread Henrique Prange via Webobjects-dev
Hi Paul, Thanks for your feedback. It's good to know that I'm not alone. :) Even though it's an unusual situation, I wondered if someone else hasn't been bitten by it too. I'll create a pull request for discussion. Fixing the problem for toOne relationships is not complicated. I'm looking at t

Re: Qualifier Evaluation with Object in Multiple Editing Contexts

2019-05-28 Thread Paul Hoadley via Webobjects-dev
Hi Henrique, On 21 May 2019, at 08:22, Henrique Prange wrote: > I've been using the EOQualifier.evaluateWithObject method to filter some EOs > in memory. Everything works fine except for one particular case. It always > returns false if I try to evaluate a qualifier containing EOs with an EO f

Qualifier Evaluation with Object in Multiple Editing Contexts

2019-05-20 Thread Henrique Prange
Hey guys, I've been using the EOQualifier.evaluateWithObject method to filter some EOs in memory. Everything works fine except for one particular case. It always returns false if I try to evaluate a qualifier containing EOs with an EO from another editing context. The code below demonstrates t