Django reversion and deletion of parent objects

51 views
Skip to first unread message

jvc26

unread,
Feb 19, 2013, 11:03:44 AM2/19/13
to django-r...@googlegroups.com
I'm interested to know how Django reversion handles deletion of related objects, for example, a User object, and a Kettle object which belongs to the user. If both are registered with Django-Reversion, are both serialized and stored as part of the pre_delete hook? And how is the relationship represented internally - i.e. does it still rely on the old primary keys to relate the two?

Thanks!

Dave Hall

unread,
Feb 19, 2013, 11:17:26 AM2/19/13
to django-r...@googlegroups.com
Deleted objects are stored as separate Version instances, generally as part of the same Revision instance. Their fields are serialized using the Django serialization framework, so the person_id field in the Kettle object will have the id of the person stored as part of the serialized representation.


On 19 February 2013 16:03, jvc26 <ja...@jvc26.org> wrote:
I'm interested to know how Django reversion handles deletion of related objects, for example, a User object, and a Kettle object which belongs to the user. If both are registered with Django-Reversion, are both serialized and stored as part of the pre_delete hook? And how is the relationship represented internally - i.e. does it still rely on the old primary keys to relate the two?

Thanks!

--
You received this message because you are subscribed to the Google Groups "django-reversion discussion group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-reversi...@googlegroups.com.
To post to this group, send an email to django-r...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-reversion?hl=en-GB.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages