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'm having problems generating a model for an existing SQL2005 database. I'm dragging tables from the VS2008 server explorer onto a lightspeed designer surface. The tables are added as entities, but none of the columns are added as properties. The table names have been changed to camel-case, so something appears to be hapenning. Trying to 'Update from Source...' returns the message 'The selected entities are up to date' without populating any properties. Are there some scenarios where the columns on a table aren't added as a property of the entity?
Dan.. |
|
|
Columns which are primary or foreign keys won't get added (the primary key comes through implicitly, and foreign keys manifest as associations once the associated table is also added). Some special columns (CreatedOn, UpdatedOn, DeletedOn and LockVersion) will be translated into properties on the entity class. Otherwise all columns should come through. I'm guessing your tables probably contain something other than PKs and FKs *grin*, so something appears to be awry. Could you post the SQL CREATE statement for one of the tables that's not working? (You can attach files via the Options tab, or if it is sensitive then you can mail it via the contact form.) Also, could you retry the drag-drop with the Output window open, and let us know if any messages appear in that window? Thanks! |
|
|
Here is the create script for the table. It's not that exciting... CREATE TABLE [dbo].[ICMSLogin](
I've tried the same operation with the output window open (and set to 'Lightspeed'), but this produces no output. However, I have been able to succesfully add the same table with columns from a different source database with the same schema. The obvious difference is that the database that populated the columns doesn't have spaces in the name. Could spaces in the database name be a source of the problem? |
|
|
Yes, spaces in the name are causing the problem (they cause the name to get passed to us with quote marks, which fouls up some of the queries we perform against the SQL Server schema). I have committed a fix for this and it will be in nightly builds dated 11 Dec 2008 and above, available from about 1430 GMT from http://www.mindscape.co.nz/products/lightspeed/nightlybuilds.aspx (Express Edition) or the store (retail editions). Alternatively of course if it is viable for you to work on a database without spaces or other special characters in the name then you will not need the update. This issue should NOT affect the LightSpeed runtime -- i.e. if you stick with your current build, although you will have to generate models off a non-spaced database, you will still be able to *use* those models against a database with spaces in the name if that fits your preferred naming convention. Thanks for reporting this issue and for helping us to diagnose it! |
|
|
Yep. The nightly build has fixed the problem. Thanks for your help Ivan. |
|