Forums / General / Scripts to validate object relations

Scripts to validate object relations

Author Message

David Boman

Friday 24 February 2006 1:39:54 am

Hi,

Browsing my logs I have found error messages related to missing objects (null-values). Tracking it a little bit further I relalised that I had forum posting that had no (or perhaps falty) user object associated with the 'modifier'-field. I have not further inestigated the root cause for this, but it leads me to question of object relation consistency.

I wonder if there exists any script to check the consistency of relations between objects in database?

Tnx,
/Boman

David Boman

Tuesday 28 February 2006 11:05:40 am

Anyone?

If such a script exists or not should be a rather easy question for someone in the eZCrew...

Sergiy Pushchin

Thursday 02 March 2006 8:19:21 am

We do not have it for now, but we are planning to add consistancy check in the future, the first step will be to add correct foreign key definition to all persistant objects,
check out the spec: http://ez.no/community/developer/specs/foreign_key_definition_in_ezpersistenceobject

David Boman

Wednesday 22 March 2006 5:59:23 am

Looks promising! I'll have to write togheter something myself to solve the problem then!

Thanx!