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
|
I'm getting an Invariant Failure when I include a [Transient] field in my entity. Are there some rules around what can and can't be or use a transient?
Thanks.
|
|
|
No, there shouldn't be any restrictions (and if there were we should give you a meaningful LightSpeedException rather than an invariant failure). Could you retry with the latest nightly build (http://www.mindscape.co.nz/products/lightspeed/nightlybuilds.aspx) and if you still have problems could you post your model (.cs, .vb or .lsmodel) and the full exception trace please? (You can attach files via the Options tab. If you don't want to post your model on the forums, email it to us via the contact form.) Thanks! |
|
|
I had a play and it looks like it could be something to do with using generics.
These transients work fine:
[Transient]
private int _Test = 0;
[Transient]
private ArrayList _Test = new ArrayList();
[Transient]
private object _Test = new Dictionary();
But these transients cause the invariant failure:
[Transient]
private List _Test = null;
[Transient]
private Dictionary _Test = new Dictionary();
[Transient]
private IDictionary _Test = null;
|
|
|
Thanks for the additional info. This was indeed a bug with the handling of generic types in [Transient] fields. I have committed a fix and it will be available in nightly builds (see http://www.mindscape.co.nz/products/lightspeed/nightlybuilds.aspx) numbered 20081009 and above. Because of a server move, "nightly" builds are currently being published only every few days. If you need this fix urgently, let us know. Thanks again for reporting the problem and helping us track it down. |
|