Re: validateXXX not called on a relationship set to null

2014-03-10 Thread John Pollard
Chuck, On 4 Mar 2014, at 17:42, Chuck Hill wrote: > Hi John, > > On 2014-03-04, 4:14 AM, "John Pollard" wrote: > > Chuck, > > Ok, will put a trap in the setXXX method and see if that catches it if it > happens again. > > I am not quite clear on what you mean about checking relationships (pl

Re: validateXXX not called on a relationship set to null

2014-03-04 Thread Chuck Hill
Hi John, On 2014-03-04, 4:14 AM, "John Pollard" wrote: Chuck, Ok, will put a trap in the setXXX method and see if that catches it if it happens again. I am not quite clear on what you mean about checking relationships (plural) to this entity in the model. My base object is Transaction My to-o

Re: validateXXX not called on a relationship set to null

2014-03-04 Thread John Pollard
Chuck, Ok, will put a trap in the setXXX method and see if that catches it if it happens again. I am not quite clear on what you mean about checking relationships (plural) to this entity in the model. My base object is Transaction My to-one related object is Organisation This relationship does

Re: validateXXX not called on a relationship set to null

2014-03-04 Thread John Pollard
Please see below... On 27 Feb 2014, at 17:01, Ramsey Gurley wrote: > > On Feb 27, 2014, at 6:43 AM, John Pollard wrote: > >> Hi List, >> >> I am trying to pin down where a to-one relationship is getting set to null >> inappropriately. > > > Override takeStoredValueForKey on the EO and loo

Re: validateXXX not called on a relationship set to null

2014-02-27 Thread Ramsey Gurley
On Feb 27, 2014, at 6:43 AM, John Pollard wrote: > Hi List, > > I am trying to pin down where a to-one relationship is getting set to null > inappropriately. Override takeStoredValueForKey on the EO and look for the null value for that key. That will pinpoint the moment it is being set to n

Re: validateXXX not called on a relationship set to null

2014-02-27 Thread Chuck Hill
Try the set… method then. Also check the relationships to this entity in the model. Is one set to Nullify? It could be EOF doing this as part of a save. Chuck On 2/27/2014, 5:43 AM, "John Pollard" wrote: Hi List, I am trying to pin down where a to-one relationship is getting set to null in

Re: validateXXX not called on a relationship set to null

2014-02-27 Thread Aaron Rosenzweig
Hi John, Could be you did it in “validateForSave()” You shouldn’t be changing values there, only throwing validation errors. Grab the snake by its tail, start pulling, keep doing it until you find the head. Namely, put your break point not in your “validateRelationship” method but more direct

validateXXX not called on a relationship set to null

2014-02-27 Thread John Pollard
Hi List, I am trying to pin down where a to-one relationship is getting set to null inappropriately. I added validateMyRelationship() to trap and throw and this is triggered ok when the base object is created / updated. However, it wasn't called when the relationship was set to null and hence