Inverted related objects not updated

Inverted related objects not updated

Tuesday 03 February 2009 9:47:26 am - 5 replies

Author Message

Gwenal Le Bihan

Wednesday 04 February 2009 2:49:19 am

A little precision..

It only happens when i delete the relate object without leaving it in the trash. There is no update of my "calling" object in this case but if i delete the related object and leave it in the trash, then my "calling" object is updated and the related object attribute value is set to 0.

I can't see why there is a difference between the two operations..

I hope I'm clear in my explanations.. :-$

G

Gwenal Le Bihan

Wednesday 04 February 2009 3:09:50 am

oups little mistake: the attribute "calling" object is not set to 0 when the deleted related object is left in the trash. It seems i don't have an error in my log just because the fetch is still possible even if placed in the trash but it doesn't answer my first question about the update of my attribute, if this is a normal behaviour.

I would assume that removing an object updates all reverse related objects but it seems it's not the case :-(

anybody to confirm?..

thx

Gwen

Fabien Mas

Thursday 05 February 2009 6:40:18 am

When you delete an object, the "fixReverseRelations" function (ezcontentobject.php) is called

This function call the "fixRelatedObjectItem" function of the datatype linked to your object

In your case, the datatype is : ezobjectrelation
But the fixRelatedObjectItem is not implemented in this datatype so , the fixRelatedObjectItem function used here is the one of the eZDataType class who does nothing

 function fixRelatedObjectItem( $contentObjectAttribute, $objectID, $mode )
    {
    }

Is it a bug ??

Fabien

André R.

Thursday 05 February 2009 9:44:46 am

>> Is it a bug?

Yes, please create a issue for it and add a link to this thread in it.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Fabien Mas

Friday 06 February 2009 12:39:20 am

It's done :
http://issues.ez.no/IssueView.php?Id=14411&activeItem=1

You must be logged in to post messages in this topic!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.