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 am reading the *.lsmodel XML and would love to display the column names to the user in the order that they appear in the database, would it be possible to add this information to the *.lsmodel XML? An order attribute on the entityProperty element would be ideal. Thanks, Jason Moore Light Speed Solutions, LLC. |
|
|
Hi Jason, Not quite sure what you're asking for -- whether to control the field order in the .lsmodel file or whether to provide metadata on the generated code that contains order information. To control the field order in the .lsmodel file, you can use the Move Up and Move Down commands (right click a property and choose Move Up/Down). To provide additional metadata on the generated code, use the Custom Attributes option (click a property, go to the Properties window, find the Custom Attributes option and click the '...' button). Does this answer your question? If not, could you say a bit more about what you're wanting to achieve? Thanks! |
|
|
Sorry, I misunderstood the underlying problem we are facing (I am looking at the XML and my colleague is using the actual Framework). It appears that when we generate a new LightSpeed Model from the database, the Column order of the LightSpeed Entity does not match the column order of the Database table. We are trying to avoid manually moving the columns in the designer. |
|
|
You mean that when you drag an entity on from Server Explorer, the order that you see in the entity is not the same as you see in your database tool? We don't currently do that, but we could probably implement it reasonably easily depending on the database engine. Which database engine do you need it for? (Note that even if we do this, Update From Source will always add fields at the end -- it will not attempt to insert new fields in the middle of the entity. Similarly, if you reorder columns within the database, Update From Source will not reorder your fields for you.) |
|
|
That sounds perfect! We are using SQL Server 2008 R2 Thanks, Jason Moore |
|
|
Hello Jason, This is available in current nightly builds -- let us know if you run into any problems. |
|