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
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
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
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
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
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
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
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
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
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
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
ot;notification");
NotificationDocumentsTab ndt = (NotificationDocumentsTab)
EOUtilities.createAndInsertInstance(ec,"NotificationDocumentsTab");
this.notification().addObjectToBothSidesOfRelationshipWithKey
(ndt ,"documentsTab");
ec.saveChanges();
However the reverse relati
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
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
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
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'
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
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
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
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
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
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
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
-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
: 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
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
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
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
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
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
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
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
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
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
34 matches
Mail list logo