Re: Delete of parent object triggers delete of to-one destination object

2010-10-07 Thread Ricardo J. Parada

Correct.  I got rid of that flattened attribute and things work as expected 
now.  The cascade delete no longer happens.


On Oct 7, 2010, at 3:29 AM, Timo Hoepfner wrote:

> Hi Ricardo,
> 
> you mean Message.mimeType is a flattened attribute to 
> Message.mimeContent.mimeType? An this is causing the unwanted cascade delete?
> 
> Sounds scary...
> 
> Timo
> 
> Am 06.10.2010 um 18:20 schrieb Ricardo J. Parada:
> 
>> 
>> 
>> Thanks Chuck... You lead me to the problem.
>> 
>> My Message entity has a mimeType property derived from mimeContent.mimeType. 
>>  So it seems that is the reason why EOF is deleting the mimeContent to-one 
>> when I delete the parent Message.
>> 
>> 
>> On Oct 5, 2010, at 8:26 PM, Chuck Hill wrote:
>> 
>>> Is there another relationship with Owns Destination or Cascade Delete set 
>>> on it.  Those are the only things that I can think of that would make EOF 
>>> delete an EO.  Could it be happening in your code?
>>> 
>>> 
>>> Chuck
>>> 
>>> On Oct 5, 2010, at 4:22 PM, Ricardo J. Parada wrote:
>>> 
 Hi,
 
 When I remove a child from a many-to-many relationship in the parent and 
 delete the child I see EOF deletes the child in the database and  the 
 corresponding record in the join table.  That's great.  However, the child 
 object has a to-one called mimeContent and I'm also seeing a delete for 
 the destination object:
 
 DELETE FROM MIME_CONTENT WHERE MIME_CONTENT_ID = ?" withBindings: 
 1:26954(NeededByEOF0)
 1 row(s) deleted
 
 I'm trying to figure out why this record is being deleted.  I already 
 checked the "Own Destination" for the mimeContent to-one and it's not set. 
  The "Delete Rule" is set to "No Action".   So I don't quite understand 
 why it's getting deleted.  I don't want it to be deleted.
 
 Any ideas?
 
 Thanks,
 Ricardo
>>> 
>>> 
>>> -- 
>>> Chuck Hill Senior Consultant / VP Development
>>> 
>>> Practical WebObjects - for developers who want to increase their overall 
>>> knowledge of WebObjects or who are trying to solve specific problems.
>>> http://www.global-village.net/products/practical_webobjects
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>> 
>> ___
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/webobjects-dev/th-dev%40onlinehome.de
>> 
>> This email sent to th-...@onlinehome.de
> 

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Delete of parent object triggers delete of to-one destination object

2010-10-07 Thread Timo Hoepfner

Hi Ricardo,

you mean Message.mimeType is a flattened attribute to  
Message.mimeContent.mimeType? An this is causing the unwanted cascade  
delete?


Sounds scary...

Timo

Am 06.10.2010 um 18:20 schrieb Ricardo J. Parada:




Thanks Chuck... You lead me to the problem.

My Message entity has a mimeType property derived from  
mimeContent.mimeType.  So it seems that is the reason why EOF is  
deleting the mimeContent to-one when I delete the parent Message.



On Oct 5, 2010, at 8:26 PM, Chuck Hill wrote:

Is there another relationship with Owns Destination or Cascade  
Delete set on it.  Those are the only things that I can think of  
that would make EOF delete an EO.  Could it be happening in your  
code?



Chuck

On Oct 5, 2010, at 4:22 PM, Ricardo J. Parada wrote:


Hi,

When I remove a child from a many-to-many relationship in the  
parent and delete the child I see EOF deletes the child in the  
database and  the corresponding record in the join table.  That's  
great.  However, the child object has a to-one called mimeContent  
and I'm also seeing a delete for the destination object:


DELETE FROM MIME_CONTENT WHERE MIME_CONTENT_ID = ?" withBindings:  
1:26954(NeededByEOF0)

1 row(s) deleted

I'm trying to figure out why this record is being deleted.  I  
already checked the "Own Destination" for the mimeContent to-one  
and it's not set.  The "Delete Rule" is set to "No Action".   So I  
don't quite understand why it's getting deleted.  I don't want it  
to be deleted.


Any ideas?

Thanks,
Ricardo



--
Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their  
overall knowledge of WebObjects or who are trying to solve specific  
problems.

http://www.global-village.net/products/practical_webobjects









___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/th-dev%40onlinehome.de

This email sent to th-...@onlinehome.de


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Delete of parent object triggers delete of to-one destination object

2010-10-06 Thread Ricardo J. Parada


Thanks Chuck... You lead me to the problem.

My Message entity has a mimeType property derived from mimeContent.mimeType.  
So it seems that is the reason why EOF is deleting the mimeContent to-one when 
I delete the parent Message.  


On Oct 5, 2010, at 8:26 PM, Chuck Hill wrote:

> Is there another relationship with Owns Destination or Cascade Delete set on 
> it.  Those are the only things that I can think of that would make EOF delete 
> an EO.  Could it be happening in your code?
> 
> 
> Chuck
> 
> On Oct 5, 2010, at 4:22 PM, Ricardo J. Parada wrote:
> 
>> Hi,
>> 
>> When I remove a child from a many-to-many relationship in the parent and 
>> delete the child I see EOF deletes the child in the database and  the 
>> corresponding record in the join table.  That's great.  However, the child 
>> object has a to-one called mimeContent and I'm also seeing a delete for the 
>> destination object:
>> 
>> DELETE FROM MIME_CONTENT WHERE MIME_CONTENT_ID = ?" withBindings: 
>> 1:26954(NeededByEOF0)
>> 1 row(s) deleted
>> 
>> I'm trying to figure out why this record is being deleted.  I already 
>> checked the "Own Destination" for the mimeContent to-one and it's not set.  
>> The "Delete Rule" is set to "No Action".   So I don't quite understand why 
>> it's getting deleted.  I don't want it to be deleted.
>> 
>> Any ideas?
>> 
>> Thanks,
>> Ricardo
> 
> 
> -- 
> Chuck Hill Senior Consultant / VP Development
> 
> Practical WebObjects - for developers who want to increase their overall 
> knowledge of WebObjects or who are trying to solve specific problems.
> http://www.global-village.net/products/practical_webobjects
> 
> 
> 
> 
> 
> 
> 

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Delete of parent object triggers delete of to-one destination object

2010-10-06 Thread Ricardo J. Parada
I asked the same thing when I saw that.  :-)  Switching it to EOInnerJoin 
doesn't make a difference though.


On Oct 6, 2010, at 6:39 AM, David Avendasora wrote:

> Out of curiosity, why is it a Left Outer Join?
> 
> Dave
> 
> On Oct 6, 2010, at 6:16 AM, Ricardo J. Parada wrote:
> 
>> The mimeContent relationship in the .plist looks like this:
>> 
>> {
>> destination = MBMimeContent; 
>> isToMany = N; 
>> joinSemantic = EOLeftOuterJoin; 
>> joins = ({destinationAttribute = mimeContentID; sourceAttribute 
>> = mimeContentID; }); 
>> name = mimeContent; 
>> }, 
>> 
>> When running the app the following code:
>> 
>> EORelationship r = 
>> EOModelGroup.defaultGroup().entityNamed("Message").relationshipNamed("mimeContent");
>> log.info(r.toString());
>> log.info("mimeContent.ownsDestination = " + 
>> r.ownsDestination());
>> log.info("mimeContent.deleteRule = " + r.deleteRule());
>> 
>> logs the following:
>> 
>> >  name : 'mimeContent'
>>  isToMany : 'N'
>>  joinSemantic : 'EOLeftOuterJoin'
>>  userInfo : '{}'
>>  internalInfo : '{}'
>>  joins : '({sourceAttribute = "mimeContentID"; destinationAttribute = 
>> "mimeContentID"; })'
>>  destination : 'MBMimeContent'
>> >
>> mimeContent.ownsDestination = false
>> mimeContent.deleteRule = 0
>> 
>> I also tested fetching a Message eo and deleting it and calling saveChanges 
>> and it's still deleting the MimeContent eo pointed by the mimeContent to-one.
>> 
>> Hmmm Very weird.
>> 
>> 
>> :-/
>> 
>> 
>> 
>> 
>> On Oct 6, 2010, at 4:50 AM, David Avendasora wrote:
>> 
>>> And if all else fails, check the .plist file for the Entity with the 
>>> relationship pointing to MIME_CONTENT.
>>> 
>>> I have had it happen where there's something weird going on in the .plist. 
>>> It's been a _long_ time though.
>>> 
>>> Dave
>>> 
>>> On Oct 5, 2010, at 9:08 PM, Ramsey Lee Gurley wrote:
>>> 
 
 On Oct 5, 2010, at 8:26 PM, Chuck Hill wrote:
 
> Is there another relationship with Owns Destination or Cascade Delete set 
> on it.  Those are the only things that I can think of that would make EOF 
> delete an EO.  
 
 I can think of one other thing, because it happened to me recently...  I 
 had a similar problem where the object was a subclass of another object.  
 Updating the delete rule on a superclass does not update the delete rule 
 on the relationships in the subclass.
 
 Ramsey
 
 
> Could it be happening in your code?
> 
> 
> Chuck
> 
> On Oct 5, 2010, at 4:22 PM, Ricardo J. Parada wrote:
> 
>> Hi,
>> 
>> When I remove a child from a many-to-many relationship in the parent and 
>> delete the child I see EOF deletes the child in the database and  the 
>> corresponding record in the join table.  That's great.  However, the 
>> child object has a to-one called mimeContent and I'm also seeing a 
>> delete for the destination object:
>> 
>> DELETE FROM MIME_CONTENT WHERE MIME_CONTENT_ID = ?" withBindings: 
>> 1:26954(NeededByEOF0)
>> 1 row(s) deleted
>> 
>> I'm trying to figure out why this record is being deleted.  I already 
>> checked the "Own Destination" for the mimeContent to-one and it's not 
>> set.  The "Delete Rule" is set to "No Action".   So I don't quite 
>> understand why it's getting deleted.  I don't want it to be deleted.
>> 
>> Any ideas?
>> 
>> Thanks,
>> Ricardo
> 
> 
> -- 
> Chuck Hill Senior Consultant / VP Development
> 
> Practical WebObjects - for developers who want to increase their overall 
> knowledge of WebObjects or who are trying to solve specific problems.
> http://www.global-village.net/products/practical_webobjects
> 
> 
> 
> 
> 
> 
> 
> ___
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/rgurley%40mac.com
> 
> This email sent to rgur...@mac.com
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com
 
 This email sent to webobje...@avendasora.com
 
 
>>> 
>>> ___
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>>> Help/Unsubscribe/Update your Subscription:
>>> htt

Re: Delete of parent object triggers delete of to-one destination object

2010-10-06 Thread David Avendasora
Out of curiosity, why is it a Left Outer Join?

Dave

On Oct 6, 2010, at 6:16 AM, Ricardo J. Parada wrote:

> The mimeContent relationship in the .plist looks like this:
> 
> {
> destination = MBMimeContent; 
> isToMany = N; 
> joinSemantic = EOLeftOuterJoin; 
> joins = ({destinationAttribute = mimeContentID; sourceAttribute = 
> mimeContentID; }); 
> name = mimeContent; 
> }, 
> 
> When running the app the following code:
> 
> EORelationship r = 
> EOModelGroup.defaultGroup().entityNamed("Message").relationshipNamed("mimeContent");
> log.info(r.toString());
> log.info("mimeContent.ownsDestination = " + 
> r.ownsDestination());
> log.info("mimeContent.deleteRule = " + r.deleteRule());
> 
> logs the following:
> 
>name : 'mimeContent'
>   isToMany : 'N'
>   joinSemantic : 'EOLeftOuterJoin'
>   userInfo : '{}'
>   internalInfo : '{}'
>   joins : '({sourceAttribute = "mimeContentID"; destinationAttribute = 
> "mimeContentID"; })'
>   destination : 'MBMimeContent'
> >
> mimeContent.ownsDestination = false
> mimeContent.deleteRule = 0
> 
> I also tested fetching a Message eo and deleting it and calling saveChanges 
> and it's still deleting the MimeContent eo pointed by the mimeContent to-one.
> 
> Hmmm Very weird.
> 
> 
> :-/
> 
> 
> 
> 
> On Oct 6, 2010, at 4:50 AM, David Avendasora wrote:
> 
>> And if all else fails, check the .plist file for the Entity with the 
>> relationship pointing to MIME_CONTENT.
>> 
>> I have had it happen where there's something weird going on in the .plist. 
>> It's been a _long_ time though.
>> 
>> Dave
>> 
>> On Oct 5, 2010, at 9:08 PM, Ramsey Lee Gurley wrote:
>> 
>>> 
>>> On Oct 5, 2010, at 8:26 PM, Chuck Hill wrote:
>>> 
 Is there another relationship with Owns Destination or Cascade Delete set 
 on it.  Those are the only things that I can think of that would make EOF 
 delete an EO.  
>>> 
>>> I can think of one other thing, because it happened to me recently...  I 
>>> had a similar problem where the object was a subclass of another object.  
>>> Updating the delete rule on a superclass does not update the delete rule on 
>>> the relationships in the subclass.
>>> 
>>> Ramsey
>>> 
>>> 
 Could it be happening in your code?
 
 
 Chuck
 
 On Oct 5, 2010, at 4:22 PM, Ricardo J. Parada wrote:
 
> Hi,
> 
> When I remove a child from a many-to-many relationship in the parent and 
> delete the child I see EOF deletes the child in the database and  the 
> corresponding record in the join table.  That's great.  However, the 
> child object has a to-one called mimeContent and I'm also seeing a delete 
> for the destination object:
> 
> DELETE FROM MIME_CONTENT WHERE MIME_CONTENT_ID = ?" withBindings: 
> 1:26954(NeededByEOF0)
> 1 row(s) deleted
> 
> I'm trying to figure out why this record is being deleted.  I already 
> checked the "Own Destination" for the mimeContent to-one and it's not 
> set.  The "Delete Rule" is set to "No Action".   So I don't quite 
> understand why it's getting deleted.  I don't want it to be deleted.
> 
> Any ideas?
> 
> Thanks,
> Ricardo
 
 
 -- 
 Chuck Hill Senior Consultant / VP Development
 
 Practical WebObjects - for developers who want to increase their overall 
 knowledge of WebObjects or who are trying to solve specific problems.
 http://www.global-village.net/products/practical_webobjects
 
 
 
 
 
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/rgurley%40mac.com
 
 This email sent to rgur...@mac.com
>>> 
>>> ___
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>>> Help/Unsubscribe/Update your Subscription:
>>> http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com
>>> 
>>> This email sent to webobje...@avendasora.com
>>> 
>>> 
>> 
>> ___
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/webobjects-dev/rparada%40mac.com
>> 
>> This email sent to rpar...@mac.com
> 

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe

Re: Delete of parent object triggers delete of to-one destination object

2010-10-06 Thread Ricardo J. Parada
The Message entity has another to-one called "notification" which has "Own 
Destination" checked.  But that to-one has a different destination entity.
Anyways, I unchecked that and tried again but it still deleting the destination 
EO of the mimeContent to-one.   :-/


On Oct 5, 2010, at 8:26 PM, Chuck Hill wrote:

> Is there another relationship with Owns Destination or Cascade Delete set on 
> it.  Those are the only things that I can think of that would make EOF delete 
> an EO.  Could it be happening in your code?
> 
> 
> Chuck
> 
> On Oct 5, 2010, at 4:22 PM, Ricardo J. Parada wrote:
> 
>> Hi,
>> 
>> When I remove a child from a many-to-many relationship in the parent and 
>> delete the child I see EOF deletes the child in the database and  the 
>> corresponding record in the join table.  That's great.  However, the child 
>> object has a to-one called mimeContent and I'm also seeing a delete for the 
>> destination object:
>> 
>> DELETE FROM MIME_CONTENT WHERE MIME_CONTENT_ID = ?" withBindings: 
>> 1:26954(NeededByEOF0)
>> 1 row(s) deleted
>> 
>> I'm trying to figure out why this record is being deleted.  I already 
>> checked the "Own Destination" for the mimeContent to-one and it's not set.  
>> The "Delete Rule" is set to "No Action".   So I don't quite understand why 
>> it's getting deleted.  I don't want it to be deleted.
>> 
>> Any ideas?
>> 
>> Thanks,
>> Ricardo
> 
> 
> -- 
> Chuck Hill Senior Consultant / VP Development
> 
> Practical WebObjects - for developers who want to increase their overall 
> knowledge of WebObjects or who are trying to solve specific problems.
> http://www.global-village.net/products/practical_webobjects
> 
> 
> 
> 
> 
> 
> 

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Delete of parent object triggers delete of to-one destination object

2010-10-06 Thread Ricardo J. Parada
The mimeContent relationship in the .plist looks like this:

{
destination = MBMimeContent; 
isToMany = N; 
joinSemantic = EOLeftOuterJoin; 
joins = ({destinationAttribute = mimeContentID; sourceAttribute = 
mimeContentID; }); 
name = mimeContent; 
}, 

When running the app the following code:

EORelationship r = 
EOModelGroup.defaultGroup().entityNamed("Message").relationshipNamed("mimeContent");
log.info(r.toString());
log.info("mimeContent.ownsDestination = " + 
r.ownsDestination());
log.info("mimeContent.deleteRule = " + r.deleteRule());

logs the following:


mimeContent.ownsDestination = false
mimeContent.deleteRule = 0

I also tested fetching a Message eo and deleting it and calling saveChanges and 
it's still deleting the MimeContent eo pointed by the mimeContent to-one.

Hmmm Very weird.


:-/




On Oct 6, 2010, at 4:50 AM, David Avendasora wrote:

> And if all else fails, check the .plist file for the Entity with the 
> relationship pointing to MIME_CONTENT.
> 
> I have had it happen where there's something weird going on in the .plist. 
> It's been a _long_ time though.
> 
> Dave
> 
> On Oct 5, 2010, at 9:08 PM, Ramsey Lee Gurley wrote:
> 
>> 
>> On Oct 5, 2010, at 8:26 PM, Chuck Hill wrote:
>> 
>>> Is there another relationship with Owns Destination or Cascade Delete set 
>>> on it.  Those are the only things that I can think of that would make EOF 
>>> delete an EO.  
>> 
>> I can think of one other thing, because it happened to me recently...  I had 
>> a similar problem where the object was a subclass of another object.  
>> Updating the delete rule on a superclass does not update the delete rule on 
>> the relationships in the subclass.
>> 
>> Ramsey
>> 
>> 
>>> Could it be happening in your code?
>>> 
>>> 
>>> Chuck
>>> 
>>> On Oct 5, 2010, at 4:22 PM, Ricardo J. Parada wrote:
>>> 
 Hi,
 
 When I remove a child from a many-to-many relationship in the parent and 
 delete the child I see EOF deletes the child in the database and  the 
 corresponding record in the join table.  That's great.  However, the child 
 object has a to-one called mimeContent and I'm also seeing a delete for 
 the destination object:
 
 DELETE FROM MIME_CONTENT WHERE MIME_CONTENT_ID = ?" withBindings: 
 1:26954(NeededByEOF0)
 1 row(s) deleted
 
 I'm trying to figure out why this record is being deleted.  I already 
 checked the "Own Destination" for the mimeContent to-one and it's not set. 
  The "Delete Rule" is set to "No Action".   So I don't quite understand 
 why it's getting deleted.  I don't want it to be deleted.
 
 Any ideas?
 
 Thanks,
 Ricardo
>>> 
>>> 
>>> -- 
>>> Chuck Hill Senior Consultant / VP Development
>>> 
>>> Practical WebObjects - for developers who want to increase their overall 
>>> knowledge of WebObjects or who are trying to solve specific problems.
>>> http://www.global-village.net/products/practical_webobjects
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> ___
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>>> Help/Unsubscribe/Update your Subscription:
>>> http://lists.apple.com/mailman/options/webobjects-dev/rgurley%40mac.com
>>> 
>>> This email sent to rgur...@mac.com
>> 
>> ___
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com
>> 
>> This email sent to webobje...@avendasora.com
>> 
>> 
> 
> ___
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/rparada%40mac.com
> 
> This email sent to rpar...@mac.com

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Delete of parent object triggers delete of to-one destination object

2010-10-06 Thread David Avendasora
And if all else fails, check the .plist file for the Entity with the 
relationship pointing to MIME_CONTENT.

I have had it happen where there's something weird going on in the .plist. It's 
been a _long_ time though.

Dave

On Oct 5, 2010, at 9:08 PM, Ramsey Lee Gurley wrote:

> 
> On Oct 5, 2010, at 8:26 PM, Chuck Hill wrote:
> 
>> Is there another relationship with Owns Destination or Cascade Delete set on 
>> it.  Those are the only things that I can think of that would make EOF 
>> delete an EO.  
> 
> I can think of one other thing, because it happened to me recently...  I had 
> a similar problem where the object was a subclass of another object.  
> Updating the delete rule on a superclass does not update the delete rule on 
> the relationships in the subclass.
> 
> Ramsey
> 
> 
>> Could it be happening in your code?
>> 
>> 
>> Chuck
>> 
>> On Oct 5, 2010, at 4:22 PM, Ricardo J. Parada wrote:
>> 
>>> Hi,
>>> 
>>> When I remove a child from a many-to-many relationship in the parent and 
>>> delete the child I see EOF deletes the child in the database and  the 
>>> corresponding record in the join table.  That's great.  However, the child 
>>> object has a to-one called mimeContent and I'm also seeing a delete for the 
>>> destination object:
>>> 
>>> DELETE FROM MIME_CONTENT WHERE MIME_CONTENT_ID = ?" withBindings: 
>>> 1:26954(NeededByEOF0)
>>> 1 row(s) deleted
>>> 
>>> I'm trying to figure out why this record is being deleted.  I already 
>>> checked the "Own Destination" for the mimeContent to-one and it's not set.  
>>> The "Delete Rule" is set to "No Action".   So I don't quite understand why 
>>> it's getting deleted.  I don't want it to be deleted.
>>> 
>>> Any ideas?
>>> 
>>> Thanks,
>>> Ricardo
>> 
>> 
>> -- 
>> Chuck Hill Senior Consultant / VP Development
>> 
>> Practical WebObjects - for developers who want to increase their overall 
>> knowledge of WebObjects or who are trying to solve specific problems.
>> http://www.global-village.net/products/practical_webobjects
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> ___
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/webobjects-dev/rgurley%40mac.com
>> 
>> This email sent to rgur...@mac.com
> 
> ___
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com
> 
> This email sent to webobje...@avendasora.com
> 
> 

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Delete of parent object triggers delete of to-one destination object

2010-10-05 Thread Ramsey Lee Gurley

On Oct 5, 2010, at 8:26 PM, Chuck Hill wrote:

> Is there another relationship with Owns Destination or Cascade Delete set on 
> it.  Those are the only things that I can think of that would make EOF delete 
> an EO.  

I can think of one other thing, because it happened to me recently...  I had a 
similar problem where the object was a subclass of another object.  Updating 
the delete rule on a superclass does not update the delete rule on the 
relationships in the subclass.

Ramsey


> Could it be happening in your code?
> 
> 
> Chuck
> 
> On Oct 5, 2010, at 4:22 PM, Ricardo J. Parada wrote:
> 
>> Hi,
>> 
>> When I remove a child from a many-to-many relationship in the parent and 
>> delete the child I see EOF deletes the child in the database and  the 
>> corresponding record in the join table.  That's great.  However, the child 
>> object has a to-one called mimeContent and I'm also seeing a delete for the 
>> destination object:
>> 
>> DELETE FROM MIME_CONTENT WHERE MIME_CONTENT_ID = ?" withBindings: 
>> 1:26954(NeededByEOF0)
>> 1 row(s) deleted
>> 
>> I'm trying to figure out why this record is being deleted.  I already 
>> checked the "Own Destination" for the mimeContent to-one and it's not set.  
>> The "Delete Rule" is set to "No Action".   So I don't quite understand why 
>> it's getting deleted.  I don't want it to be deleted.
>> 
>> Any ideas?
>> 
>> Thanks,
>> Ricardo
> 
> 
> -- 
> Chuck Hill Senior Consultant / VP Development
> 
> Practical WebObjects - for developers who want to increase their overall 
> knowledge of WebObjects or who are trying to solve specific problems.
> http://www.global-village.net/products/practical_webobjects
> 
> 
> 
> 
> 
> 
> 
> ___
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/rgurley%40mac.com
> 
> This email sent to rgur...@mac.com

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Delete of parent object triggers delete of to-one destination object

2010-10-05 Thread Chuck Hill
Is there another relationship with Owns Destination or Cascade Delete set on 
it.  Those are the only things that I can think of that would make EOF delete 
an EO.  Could it be happening in your code?


Chuck

On Oct 5, 2010, at 4:22 PM, Ricardo J. Parada wrote:

> Hi,
> 
> When I remove a child from a many-to-many relationship in the parent and 
> delete the child I see EOF deletes the child in the database and  the 
> corresponding record in the join table.  That's great.  However, the child 
> object has a to-one called mimeContent and I'm also seeing a delete for the 
> destination object:
> 
> DELETE FROM MIME_CONTENT WHERE MIME_CONTENT_ID = ?" withBindings: 
> 1:26954(NeededByEOF0)
> 1 row(s) deleted
> 
> I'm trying to figure out why this record is being deleted.  I already checked 
> the "Own Destination" for the mimeContent to-one and it's not set.  The 
> "Delete Rule" is set to "No Action".   So I don't quite understand why it's 
> getting deleted.  I don't want it to be deleted.
> 
> Any ideas?
> 
> Thanks,
> Ricardo


-- 
Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall 
knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects









smime.p7s
Description: S/MIME cryptographic signature
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Delete of parent object triggers delete of to-one destination object

2010-10-05 Thread Ricardo J. Parada
Hi,

When I remove a child from a many-to-many relationship in the parent and delete 
the child I see EOF deletes the child in the database and  the corresponding 
record in the join table.  That's great.  However, the child object has a 
to-one called mimeContent and I'm also seeing a delete for the destination 
object:

DELETE FROM MIME_CONTENT WHERE MIME_CONTENT_ID = ?" withBindings: 
1:26954(NeededByEOF0)
1 row(s) deleted

I'm trying to figure out why this record is being deleted.  I already checked 
the "Own Destination" for the mimeContent to-one and it's not set.  The "Delete 
Rule" is set to "No Action".   So I don't quite understand why it's getting 
deleted.  I don't want it to be deleted.

Any ideas?

Thanks,
Ricardo

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com