This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, I am using the 12/6/2010 nightly build of Lightspeed Pro over a SQLite database. It is a WinForms application in .NET 4.0. In my model, I have an entity named Person which has a Boolean property named RegConfirmed. This RegConfirmed property is a User Defined Type converter which looks like this: public class SQLiteBoolConverter : IFieldConverter public object ConvertToDatabase(object value) The Person entity contains a collection of (child) Job entities. The trouble is that if I edit one of the child Job entities, then decide to abandon the edit by calling CancelEdit() on that instance of Job, the below exception is thrown. If I remove the custom Data Type from the RegConfirmed entity property, and just treat it as its native Int32, no exception occurs. A breakpoint in the SQLiteBoolConverter methods is not hit when CancelEdit() is called, if that matters. It *seems* that the CancelEdit() on the child Job instance is affecting the parent Person instance but the field converter is skipped. Either that, or it's a very clever disguise... Any thoughts or suggestions on this? Best regards, and thank you for your time. Lionel The exception: System.ArgumentException was unhandled by user code |
|
|
Thanks for drawing our attention to this bug. Unfortunately I don't think there's a workaround other than going back to "integer field, handcoded boolean property, do your own conversion in the property getters and setters." However, I have now committed a fix for this issue and it will be included in the next nightly build. Please give it a try and let us know if you still see problems. |
|
|
Hello- Just writing to report that the nightly build change works great. Thank you! I appreciate your time and effort very much. Best regards, Lionel |
|