array fault firing from addObjectToBothSidesOfRelationshipWithKey(, )

2008-01-17 Thread Patrick Middleton
Hi, periodically people post to this list with problems where adding or removing objects from a one-to-many relationship using addObjectToBothSidesOfRelationshipWithKey(,) or removeObjectFromBothSidesOfRelationshipWithKey(,) causes the an array fault to fire in the owning object

Re: Problems with addObjectToBothSidesOfRelationshipWithKey

2007-10-19 Thread Sam Barnum
Hi Owen, On 19/10/2007, at 11:24 AM, Owen McKerrow wrote: Im having a problem with addObjectToBothSidesOfRelationshipWithKey, either that or I don't understand how its meant to work correctly. That is when you use addObjectToBothSidesOfRelationshipWithKey the relationships between

Re: Problems with addObjectToBothSidesOfRelationshipWithKey

2007-10-18 Thread Owen McKerrow
nce is the ability to hold two opposed ideas in the mind at the same time and still be able to function.' -F.Scott Fitzgerald, On 19/10/2007, at 11:36 AM, Lachlan Deck wrote: Hi Owen, On 19/10/2007, at 11:24 AM, Owen McKerrow wrote: Im having a problem with addObjectToBothSides

Re: Problems with addObjectToBothSidesOfRelationshipWithKey

2007-10-18 Thread Owen McKerrow
opposed ideas in the mind at the same time and still be able to function.' -F.Scott Fitzgerald, On 19/10/2007, at 11:36 AM, Lachlan Deck wrote: Hi Owen, On 19/10/2007, at 11:24 AM, Owen McKerrow wrote: Im having a problem with addObjectToBothSidesOfRelationshipWithKey, either

Re: Problems with addObjectToBothSidesOfRelationshipWithKey

2007-10-18 Thread Owen McKerrow
is either rowID or personID set as a class property in EOModeler ? Simon On 19 Oct 2007, at 02:24, Owen McKerrow wrote: Hi All, Im having a problem with addObjectToBothSidesOfRelationshipWithKey, either that or I don't understand how its meant to w

Re: Problems with addObjectToBothSidesOfRelationshipWithKey

2007-10-18 Thread Lachlan Deck
Hi Owen, On 19/10/2007, at 11:24 AM, Owen McKerrow wrote: Im having a problem with addObjectToBothSidesOfRelationshipWithKey, either that or I don't understand how its meant to work correctly. That is when you use addObjectToBothSidesOfRelationshipWithKey the relationships between

Problems with addObjectToBothSidesOfRelationshipWithKey

2007-10-18 Thread Owen McKerrow
Hi All, Im having a problem with addObjectToBothSidesOfRelationshipWithKey, either that or I don't understand how its meant to work correctly. That is when you use addObjectToBothSidesOfRelationshipWithKey the relationships between both objects should be updated. So if you hav

Re: Question on addObjectToBothSidesOfRelationshipWithKey

2007-07-25 Thread James Cicenia
Well after spending too much time checking the model etc... I just assumed it is a bug and explicitly set the relations and it works now. James On Jul 24, 2007, at 9:29 PM, Lachlan Deck wrote: On 25/07/2007, at 5:57 AM, James Cicenia wrote: I checked the model "carefully"... the relations

Re: Question on addObjectToBothSidesOfRelationshipWithKey

2007-07-24 Thread Lachlan Deck
On 25/07/2007, at 5:57 AM, James Cicenia wrote: I checked the model "carefully"... the relationship from pn -- ndt is such where ndt uses vertical inheritance so has a qualifier in it. If you're using vertical inheritance the rule-of-thumb I found that works is: 'every non-class foreign

Re: Question on addObjectToBothSidesOfRelationshipWithKey

2007-07-24 Thread Chuck Hill
DocumentsTab ndt = (NotificationDocumentsTab) EOUtilities.createAndInsertInstance(ec,"NotificationDocumentsTab"); this.notification().addObjectToBothSidesOfRelationshipWithKey (ndt ,"documentsTab"); ec.saveChanges(); However the reverse relationship from ndt to pn doesn't get fil

Re: Question on addObjectToBothSidesOfRelationshipWithKey

2007-07-24 Thread James Cicenia
ertInstance(ec,"NotificationDocumentsTab"); this.notification().addObjectToBothSidesOfRelationshipWithKey (ndt ,"documentsTab"); ec.saveChanges(); However the reverse relationship from ndt to pn doesn't get filled. Is this because pn wasn't committed yet? portf

Re: Question on addObjectToBothSidesOfRelationshipWithKey

2007-07-24 Thread Chuck Hill
ot;notification"); NotificationDocumentsTab ndt = (NotificationDocumentsTab) EOUtilities.createAndInsertInstance(ec,"NotificationDocumentsTab"); this.notification().addObjectToBothSidesOfRelationshipWithKey (ndt ,"documentsTab"); ec.saveChanges(); However the reverse relati

Question on addObjectToBothSidesOfRelationshipWithKey

2007-07-24 Thread James Cicenia
ficationDocumentsTab) EOUtilities.createAndInsertInstance(ec,"NotificationDocumentsTab"); this.notification().addObjectToBothSidesOfRelationshipWithKey (ndt ,"documentsTab"); ec.saveChanges(); However the reverse relationship from ndt to pn doesn't get filled. Is this

Re: D2W does not do addObjectToBothSidesOfRelationshipWithKey

2007-07-12 Thread Robert Walker
addObjectToBothSidesOfRelationshipWithKey won't work, because it will not find an inverse relationship. What you have are two separate, unidirectional, relationships that D2W won't manage for you. a-pk<--b-fk a-fk --> b-pk not the same as: a-pk<-->b-pk (true one-to-one) not the same

Re: D2W does not do addObjectToBothSidesOfRelationshipWithKey

2007-07-12 Thread Alexander Spohr
orehand which one of the records will relate to which record in the other table. Then it is not a true 1:1 as one a may have many b’s and one b may have many a’s. Thats what Robert meant by not being a true 1:1. If you join a PK to an FK you always have a 1:n Anyway, D2W should always call addO

Re: D2W does not do addObjectToBothSidesOfRelationshipWithKey

2007-07-12 Thread Johan Henselmans
hich record in the other table. These tables are created somewhere else, not in the WebObjects. One is an import from a csv table, the other from a random generator. If it's the latter case, and D2W is not properly calling addObjectToBothSidesOfRelationshipWithKey, then it wouldn'

Re: D2W does not do addObjectToBothSidesOfRelationshipWithKey

2007-07-12 Thread Robert Walker
ou set "Propagates Primary Key?" If it's a true one-to-one it's that property of the model that is responsible to setting the destination PK. If it's the latter case, and D2W is not properly calling addObjectToBothSidesOfRelationshipWithKey, then it wouldn't be doing

D2W does not do addObjectToBothSidesOfRelationshipWithKey

2007-07-12 Thread Johan Henselmans
I am updating a old D2W app to the latest and greatest Wonder/Eclipse combo, and after adding some records to a database, I noticed that the table on the other side of the relationship did not get an update in it's foreign_id key field (it's a one-to-one relationship with with relationships

Re: AddObjectToBothSidesOfRelationshipWithkey

2007-04-19 Thread Alexander Spohr
an A or C. Am 19.04.2007 um 16:42 schrieb Frank Stock: Ken, I have a many to many relation. A<->>B<<->C Primary keys are A.pk,B.pk,C.pk The select statements are (after the 2 addObjectToBothSidesOfRelationshipWithKey) select t0. from B where A.pk= ; select t

Re: AddObjectToBothSidesOfRelationshipWithkey

2007-04-19 Thread Chuck Hill
On Apr 19, 2007, at 7:42 AM, Frank Stock wrote: Ken, I have a many to many relation. A<->>B<<->C Primary keys are A.pk,B.pk,C.pk The select statements are (after the 2 addObjectToBothSidesOfRelationshipWithKey) select t0. from B where A.pk= ; select t0

Re: AddObjectToBothSidesOfRelationshipWithkey

2007-04-19 Thread Frank Stock
Ken, I have a many to many relation. A<->>B<<->C Primary keys are A.pk,B.pk,C.pk The select statements are (after the 2 addObjectToBothSidesOfRelationshipWithKey) select t0. from B where A.pk= ; select t0 from B where C.pk = ; This doesn't mak

Re: AddObjectToBothSidesOfRelationshipWithkey

2007-04-19 Thread Patrick Middleton
On 19 Apr 2007, at 14:57, Frank Stock wrote: Ken, what I don't understand is why all the relation-rows are fetched, not just the selection thats needed? A <--- B A has an array fault; if you touch it, EOF will go to the database to get all B belonging to A. If you do a.addObjectToB

Re: AddObjectToBothSidesOfRelationshipWithkey

2007-04-19 Thread Ken Anderson
n there is a one-to-many or many-to-many it is advised not use addObjectToBothSidesOfRelationshipWithKey instead use the individual addTo() methods. When we use addObjectToBothSidesOfRelationshipWithKey , it tries to fault the objects in the relationship and that is what you see "Select statements". Better go wi

Re: AddObjectToBothSidesOfRelationshipWithkey

2007-04-19 Thread Frank Stock
-07, om 13:30 heeft Shravan Kumar.M het volgende geschreven: Hello Frank, When there is a one-to-many or many-to-many it is advised not use addObjectToBothSidesOfRelationshipWithKey instead use the individual addTo() methods. When we use addObjectToBothSidesOfRelationshipWithKey , it tries to faul

Re: AddObjectToBothSidesOfRelationshipWithkey

2007-04-19 Thread Patrick Middleton
: webobjects-dev@lists.apple.com Subject: AddObjectToBothSidesOfRelationshipWithkey Hi, When I do this: ... This will take 90 seconds to complete (will all the rest of the code) I can see in the debugger that every time I do a AddObjectToBothSidesOfRelationshipWithkey WO will perform a

Re: AddObjectToBothSidesOfRelationshipWithkey

2007-04-19 Thread Ken Anderson
I did test it with addTo and that just gives me the same result! Thanks, Frank Stock Op 19-apr-07, om 13:30 heeft Shravan Kumar.M het volgende geschreven: Hello Frank, When there is a one-to-many or many-to-many it is advised not use addObjectToBothSidesOfRelationshipWithKey instead us

Re: AddObjectToBothSidesOfRelationshipWithkey

2007-04-19 Thread Frank Stock
HI, I did test it with addTo and that just gives me the same result! Thanks, Frank Stock Op 19-apr-07, om 13:30 heeft Shravan Kumar.M het volgende geschreven: Hello Frank, When there is a one-to-many or many-to-many it is advised not use addObjectToBothSidesOfRelationshipWithKey instead

Re: AddObjectToBothSidesOfRelationshipWithkey

2007-04-19 Thread Shravan Kumar.M
Hello Frank, When there is a one-to-many or many-to-many it is advised not use addObjectToBothSidesOfRelationshipWithKey instead use the individual addTo() methods. When we use addObjectToBothSidesOfRelationshipWithKey , it tries to fault the objects in the relationship and that is what

AddObjectToBothSidesOfRelationshipWithkey

2007-04-19 Thread Frank Stock
block"); bpObject.addObjectToBothSidesOfRelationshipWithKey (pObject,"property"); This will take 90 seconds to complete (will all the rest of the code) I can see in the debugger that every time I do a AddObjectToBothSidesOfRelationshipWithkey WO will perform a sel

Re: addObjectToBothSidesOfRelationshipWithKey still working?

2006-09-18 Thread Jean Pierre Malrieu
First, a question: from a database standpoint, is it OK to have a too many relationship with no (to-one) reverse relationship? I answer my own (silly) question here: No it is not possible for EOF to handle a to-many relatioship with no reverse, to-one, relationship. This is because the i

Re: addObjectToBothSidesOfRelationshipWithKey still working?

2006-09-15 Thread Jean Pierre Malrieu
I have been using addObjectToBothSidesOfRelationshipWithKey reliably for years now, and since I upgraded to WO 5.3.2 ( the version that comes with XCode 2.4) I am seing strange problems. I can't believe there is bug in there... but... First, a question: from a database standpoint, is it

Re: addObjectToBothSidesOfRelationshipWithKey still working?

2006-09-15 Thread Jean Pierre Malrieu
Hi! Don't have time to look at your code now, but i'm massively using addObjectToBothSidesOfRelationshipWithKey on 5.3.1 and I have no problem at all. Yours Miguel Arroz Me too. But I think my problems started with 3.3.2. Sorry I meant 5

Re: addObjectToBothSidesOfRelationshipWithKey still working?

2006-09-14 Thread Jean Pierre Malrieu
Le 15 sept. 06 à 01:53, Miguel Arroz a écrit : Hi! Don't have time to look at your code now, but i'm massively using addObjectToBothSidesOfRelationshipWithKey on 5.3.1 and I have no problem at all. Yours Miguel Arroz Me too. But I think my problems started with 3

addObjectToBothSidesOfRelationshipWithKey still working?

2006-09-14 Thread Jean Pierre Malrieu
I have been using addObjectToBothSidesOfRelationshipWithKey reliably for years now, and since I upgraded to WO 5.3.2 ( the version that comes with XCode 2.4) I am seing strange problems. I can't believe there is bug in there... but...First, a question:  from a database standpoint, is it OK to