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
|
LightSpeed always trys to save a field to the database, even if there is no matching column with that name, if the field is a struct. |
|
|
You can use the Transient attribute to mark any fields that shouldn't be mapped. Cheers, Andrew. |
|
|
I didn't realise that Lightspeed tried to persist all valuetype fields. Previously my only non-saved fields were reference types and that is what confused me. A feature that I think would be worthwhile would Lightspeed being able to figure out which fields could be persisted automatically. It could get the table's schema and then use that so as to avoid saving fields which would cause exceptions. That would simplify things for developers when writing entities. |
|
|
Hey James, If you have control over your database schema then maybe check out the LightGen generator I'm working on. That will help/kill any sync issues between your model and database schema. I added support for Transient last night as well as compiled against version 0.5 - I'll release the patched version tomorrow. I havent tested enums/reference data yet but will patch that in (if needed) in a future release. Cheers, James |
|