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 Lightspeed guys, we are using partial methods to enhance the model with custom properties as per rich domain model pattern. However, when creating properties with both getters and setters, Lightspeed seems to think that this property is mappable to the database and includes these properties automagically in queries, which breaks them. This is possible to circumvent if you add a private backing field marked as transient which is used in the property. But what if I DON'T wish to use a backing field? It would be great if Lightspeed's Transient attribute could also be set on properties - and I see no reason why this shouldn't be possible. Fix, pretty please? :) Best regards, Safurudin |
|
|
Sorry, this isn't really possible. Even automatic properties have a backing field. Yes, it's magically created by the compiler instead of being written by hand, but we have no way of knowing that -- there's no reliable way for us to distinguish between compiler-generated autoprop backing fields and real entity fields. However, you may find the Visual Studio propfull snippet handy. If you use propfull instead of prop, VS will generate an explicit backing field for you. So writing 'non-automatic' properties is really little more effort than writing automatic ones. |
|