Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

SS2.8 odd database entries


Reply


294 Views

Avatar
jennymgray

Community Member, 9 Posts

9 November 2012 at 12:17am

I've noticed some odd corrupt records in my database and can't work out how they got there. It looks to me as if the DataObject::write() function is failing half way through.

Basically I get a new row where everything is NULL or default value except for the creation date.

From my reading of write() it seems as if the first step of an INSERT is to write such an 'empty' record, and then update it with the real values to be inserted. How/why is it going wrong in the middle? Why aren't there transaction wrappers around the set of statements to ensure this doesn't happen? And what's happening to the 'real' data - I'm worried that its being lost.

Is there anything I can do to resolve this issue, or do I just periodically clean the corruptions out?

Is SS3 any better (I haven't had a chance to look at the implications of upgrading yet)?

If it helps, I'm running on MSSQL.

Jenny