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 have been tracking down this bug but finally found it. SqlException: Incorrect syntax near '<' I figured out that I had an auto property in one of my persistent classes. So I thought I would just mark it as transient. that was a no go. Because transient only works on Class and Field. I guess it slipped my mind that auto properties create a field at compile time. maybe in a future release transient could be compatible with c#3.0 auto property no rush becasue it is the easiest thing to fix on our end (now that I know) and it probably would be very hard to do on your end This is mainly for the person like me who gets this error and forgot to use a logger to check the sql |
|
|
It might not be as hard as I thought you could just ignore fields ending with _BackingField |
|
|
Thanks for reporting this. Unfortunately C# 3 does not allow attributes to be applied to automatic properties, and we can't rely on the compiler's internally generated names for the backing fields (that could change in the next version, or even with the next hotfix), so I don't think there is any way around having to create a regular property. We'll see if we can improve that error message though. |
|
|
Is there any news about this feature? I tried and it's seem that it is still not possible to add the Transient attribute to an auto-implemented property. I understand that if I want to create a partial class that add new properties to an objet of the model handled by LightSpeed, I must write all my properties with a backing store field or set the Transient attribute to the class. It is correct? Thank you. |
|
|
That's correct. Actually, you must put [Transient] on the backing field, not the whole class. Putting it on the whole class will exclude the class from persistence altogether. |
|