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
|
Here is my code:
I am using ConsoleLogger to show up the SQL command that LightSpeed sent to Oracle.
I got "System.FormatException". By the way, the Id column is a string type that is a primary key. Does anyone could tell me what am I wrong? Thanks |
|
|
I found another problem. When I drag & drop tables in Solution Explorer into LightSpeed Model Designer, all the underline ( _ ) has been truncated and the "Column Name" field of each property are all empty. Due to this situation, the LightSpeed generated SQL string are all wrong because the column name doesn't match the original field name in the Oracle database table. Is this a bug? |
|
|
Hi, Thanks for your feedback. LightSpeed does not support string identities - only number types and GUIDs. The suggested way of resolving this is to use a surrogate key if possible (of either GUID or a number type which LightSpeed can use for the internal identity). Regarding the second point about the _ in the names, we will investigate this. Are you using the current nightly build? If not, you can get the latest nightly build here: http://www.mindscape.co.nz/Products/LightSpeed/nightlybuilds.aspx We're approaching the next release of LightSpeed (2.1) and many features, tweaks and bug fixes have been added which are now available in the nightlies. Thank-you for your feedback and I hope this helps, John-Daniel Trask |
|
|
Hi, The Sequence IdentityMethod expects an integral Id type (either int or long). Any reason you're using a string? Cheers, Andrew. |
|
|
Hi Andrew, I don't know the reason. I am not a DBA. I am just a Developer. So I don't have the right to change schema. Does any way to fix this issue? Best regards, |
|
|
Hi John-Daniel, I've tried the nightly build today. It looks like the same, the underscore ( _ ) still been truncated. Will |
|
|
Hi Will, This sounds like there may be a designer bug -- can you send us the definition (schema) for one or two of the tables that are failing? Thanks! |
|
|
Here is the schema. By the way, the SynchroUrl and AsynchroUrl property are wrong. The actual column name should be "SYNCHRO_URL" and "ASYNCHRO_URL".
<?xml version="1.0" encoding="utf-8"?> <model dslVersion="1.0.0.0" name="LightSpeedModel1" targetNamespace="ConsoleApplication1" databaseProvider="Oracle9" connectionString="XXX" pluralizedInDatabase="false" xmlns="http://namespaces.mindscape.co.nz/lightspeed"> <entities> <entity name="Table1" identityType="Int32" cacheExpiry="0" tableName="Table1"> <entityProperties> <entityProperty name="Name" isNullable="true"> <validations> <lengthValidation minimumLength="0" maximumLength="150" /> </validations> </entityProperty> <entityProperty name="SynchroUrl" isNullable="true"> <validations> <lengthValidation minimumLength="0" maximumLength="500" /> </validations> </entityProperty> <entityProperty name="AsynchroUrl" isNullable="true"> <validations> <lengthValidation minimumLength="0" maximumLength="500" /> </validations> </entityProperty> </entityProperties> </entity> </entities> </model> |
|
|
Thanks. If I've understood you correctly, your database table includes a column called SYNCHRO_URL. The designer is inferring the name SynchroUrl for the corresponding property (which is intentional, as this is the convention for object property names), but is failing to set the ColumnName to SYNCHRO_URL. This is a bug. We have now fixed this, and the fix will be included in the next nightly build (numbered 20080730 or above, available from http://www.mindscape.co.nz/Products/LightSpeed/nightlybuilds.aspx after about 1800 GMT). In the interim, you can set the ColumnName manually by selecting the property and editing it in the Properties window. Thanks for alerting us to this issue and helping us to reproduce it. |
|
|
Hi, I've tried the LightSpeedExpress-20080731.msi. Most of the column name issues are solved, but I found another bug. I have two tables. Table1 have a column named "GROUP_ID" that are related to Table2 ( Foreign Key ). After I drag tables into LightSpeed Model Designer, the code generated column become "GroupId", that cause error when executing SQL. The right column should be "GROUP_ID", but you sent "GroupId" into Oracle. Here is the oneToManyAssociations part of *.lsmodel file. <oneToManyAssociations> <oneToManyAssociation Id="7a360eff-05f1-497e-a3eb-989d286bcd4c" collectionName="Table2" backreferenceName="Group" eagerLoad="false" isDependent="false" isNullable="true"> <entityMoniker name="/LightSpeedModel1/Table2" /> </oneToManyAssociation> </oneToManyAssociations> There is no way to assign relation column name in the *.lsmodel. Do you have any idea on this issue?
|
|
|
I have now added the ability to specify a column name for a one-to-many association. This can be done manually, or should be inferred the association is inferred from dragged tables. This will be in nightly builds numbered 20080805 and above, available from about 1800 GMT. Thanks for reporting this! |
|
|
I tried 20080806 nightly build. The output SQL are correct. But my application still raise Exception! Here is the exception message: Unhandled Exception: Mindscape.LightSpeed.LightSpeedException: Unable to materializ Did your product fully tested on Oracle database? |
|
|
Yes, we run our full test suite against Oracle. Can you please tell me the data types of the GroupId field and the underlying column? Cheers, Andrew. |
|
|
The GROUP_ID's data type is "VARCHAR2(30)". |
|
|
Hi, We've now added support for string keys. It is available in the next nightly build. Please let me know if it resolves your issue. Cheers, Andrew. |
|