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
|
It apprears that the lightspeed designer omits the underscore "_" from the field names. I wish we can control this behavior since I am porting from EF classes and the underscore remians there in EF. So, all binding logic will have to be revisited and modified |
|
|
This is deliberate: the .NET convention is to PascalCase names rather than using underscores. We are considering providing an extensibility point in the designer to override or customise this behaviour but this is likely to be a post-3.0 feature. You can of course rename the properties to restore the underscores. This could be a bit tedious for large model but if you have a consistent convention then you could do it by writing a script, because the .lsmodel file is just XML. (Actually, given that the underscored version will be preserved as the columnName attribute, you can probably script it even if you don't have a consistent convention -- just copy the columnName attribute to the name attribute.) Note also we had a bug in 2.2 RTM whereby, if you had a property name with an underscore (e.g. My_Property), that underscore was removed in the backing field in the generated code (so it became _myProperty instead of _my_Property). This could cause mapping failures at runtime. This bug is fixed in current nightly builds. |
|
|
Thanks for your prompt reply. and yes, I could revert back to the field names with the underscore using a regex utility which processed the xml file as needed by placing the column name back in the entity property name.
|
|