How to debug your code

With two specific entities we receive this message when saving: "Edit was unsuccessful. Please correct the errors and try again." There's no other clue on what went wrong so we need to debug our code but we've been quite unsuccesful. Perhaps
anyone can share a good practice?

1) If you have any kind of customisation of views at all (though I'm assuming you don't here), I recommend that you create a parallel run project that has only the generic views with no customisation - and revert to that one for debugging. (For
example, in custom views it is easy to accidentally obscure or omit some of the feedback information).

2) In this particular case:

- Are you editing a persistent object, or attempting to save a transient one? If the latter, then this kind of issue can arise if you have any associated transient objects that are not complete (or not saveable for other reasons). That said, you still
ought to be getting some kind of feeback about it.

- Are you using any complex types? (Though, again, more specific feedback should be there).

3) Sometimes it can be helpful to switch off the entity persistor and use the in-memory persistor to see if you get the errors with both - this is a one line change in the Run class.

This may be related to issue #10 where we were returning an inadequate error message in certain circumstances.

If so you may find that if you build a more recent version of the code including the fix for issue #10 you get a better error message.

Generally also the symbols have been uploaded to symbolsource.org so you should be able to debug into the code. Eg you should be able to put a breakpoint in one of the methods in GenericController and then step through the code from there.

I used the source code (also to test if issue #11 solved the case) and apperently you didn't fix issue #3 completely since there are two "k.StartsWith" comparisons in the code. You've changed only one into "IdHelper.StartsWith", it got stuck at the other
one. Do you think "StartsWith" is a good function to do an exact comparison? Anyway, here's my patch using a Split: