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 have view with database identity column name = "Prefix_Id". Entity created by designer is following: Identity Column Name = "PrefixId" Entity Property { Name = "PrefixId", Column name = "Prefix_Id" } When i run: dataUnitOfWork .Entities.ToList();Following exception is thrown: "ORA-06550: line 5, column 18:\nPLS-00302: component 'PrefixId' must be declared\nORA-06550: line 5, column 3:\nPL/SQL: ORA-00904: \"V_ENTITY\".\"PREFIXID\": invalid identifier\nORA-06550: line 4, column 1:\nPL/SQL: SQL Statement ignored\ |
|
|
Can i force designer does not remove underscore symbols from database name while forming entity names, in order to prevent all similar problems? I want have entity names exactly equals to database names. |
|
|
http://www.mindscape.co.nz/forums/Thread.aspx?ThreadID=2068
|
|
|
Can you provide us with your CREATE TABLE script please? I have tried this in our test environment and the designer seems to be correctly inferring Identity Column Name with the underscore, and not including a separate entity property, which is the correct behaviour and would result in a successful query. Regarding forcing the designer to retain underscore symbols in names, no, there isn't a way to do this. The designer deliberately encourages you to comply with .NET's PascalCasing conventions by inferring PascalCased names, and to map these to your database conventions (if they are different, as yours are) using the Table Name and Column Name settings. A possible future enhancement will be to allow the use of custom naming conventions during database drag-and-drop. This is primarily aimed at those unlucky souls who are stuck with tables named "tbl_xxx" and columns named "col_xxx", but would also address your requirement. We don't have any specific plans for a delivery timescale though. |
|
|
I've attached VS solution where my problem is reproduced. Naming conventions during database drag-and-drop will be a useful feature.
|
|
|
I've attached VS solution where my problem is reproduced. Custom naming conventions during database drag-and-drop will be a useful feature.
|
|
|
Ah, sorry, I missed that you were using a view. The LightSpeed designer recognises identity columns in two ways: by the presence of a primary key, or failing that if the column is not named "Id". If there's no primary key, and no column named "Id", the designer has no way of knowing which column is the identity column. As a view does not have a primary key, if you have a view whose identity column is not named "Id", the designer will not infer any name for the identity column. In these cases you will always need to specify the identity column by hand. (You note in an earlier post that the designer infers an identity column name of "PrefixId", but I've tried this with your view, and in my test environment the Identity Column Name for your view is left blank.) There's not really much we can do about this because there's nothing in the view definition to distinguish one particular column as the identity. Sorry! |
|