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
|
Hello, I' trying to drag and drop a view from opened database connection(MySql) to LightSpeed designer to generate the code. but the generation fails since the view does not have any primary key (I don't think I can add a key to a view) how to solve this? |
|
|
You will need to be able to map a column as the identity (and it needs to be unique) otherwise you wont be able to work with this. Assuming you do have a candidate for the identity, presumably the column is not named "Id" so you will want to define the entity manually with the designer and then set the column name for the identity to be your candidate column and add the other columns as standard entity properties. You can then query against that entity supplying the ViewName to be used which will load the data from the view. See http://www.mindscapehq.com/documentation/lightspeed/Controlling-the-Database-Mapping/Working-with-Database-Views for more details about your options with querying and more generally for information about working with views with LightSpeed.
|
|