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
|
There seems to be a bug with Ligthspeed 3 beta when using a string as the identity column, it doesn't seem like it's possible, but it was possible with Lightspeed 2.0. Is this expected behavior? If not, when can we expect a fix with a new beta-release? :) |
|
|
There shouldn't be any regression there. What is the error / unexpected behaviour that you're seeing? Thanks! |
|
|
From the SQL log: -- Add table HealthAuthCodes to the database
|
|
|
Aah, I see... This happens because in LightSpeed 2, the designer defaulted string fields with no length validation to length 10, but LightSpeed 3 defaults them to "max." And we don't provide a way to specify a maximum length for string IDs. So in LS2, HealthAuthCodes.Id would have been NVARCHAR(10), which is legal as a key column; but NVARCHAR(MAX) is not. To get around this, I'll need to implement something to allow sizing of key columns in the designer. That shouldn't be a problem, but can you let me know how urgent this is for you so I can prioritise it? Thanks! You should be able to work around it by creating the table and ID column in SQL Server Management Studio, then using Update Database to create the rest of the columns... |
|
|
It would've been really nice if you could make this for the next release of LS 3 beta. We have done a "not-so-good" solution by moving the string-field into the class and just having a guid as ID on the classes that we wanted to use strings as IDs on. I like to be able to do everything in the designer and not having to think about the SQL :) It also serves the purpose of being a good way to document the design.
|
|
|
Hello Thomas, This will be fixed in the next drop of LS3. I have added an Identity Column Size setting (in the Roundtripping category): set this to the desired size of the ID column before creating the table. Note that at the moment LightSpeed will not detect if you change the Identity Column Size after creating the table; any such updates will need to be applied by hand. Additionally, setting this does not cause any validation of the Id property within LightSpeed -- it is solely for use in the database. Thanks again for reporting this issue. |
|